Here you will find example plugins that cover the basics for writing collector, processor and publisher plugins. When compiling source code, use static linking. This will ensure dependent libraries are built into the binaries and not required to locate libs during runtime.
To get these example collector, processor, and publisher plugins to build properly and work with Snap you will need to install dependencies mentioned in repository README. You should also add snaptel and snapteld in your $PATH. To test these plugins with Snap, you will need to have Snap installed, check out these docs for Snap setup details.
git clone github.com/intelsdi-x/snap-plugin-lib-cpp.git
Refer to repository README for installation instructions.
Enter the examples directory and execute make, followed by 'make install'. With 'make install', the example plugin libraries will be copied into examples/bin:
$ cd examples
$ make
$ make install$ cd examples
$ ./run.sh$ snaptel task list
ID NAME STATE HIT MISS FAIL CREATED LAST FAILURE
7d614c46-e34b-4d6f-9de7-6731cf63b6ad Task-7d614c46-e34b-4d6f-9de7-6731cf63b6ad Running 191 0 0 2:06PM 1-10-2017