Skip to content

Latest commit

 

History

History
 
 

README.md

Snap Plugin C++ Library Examples

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.

Build Plugins & Use with Snap

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.

1. Get the plugin library repo:

git clone github.com/intelsdi-x/snap-plugin-lib-cpp.git

2. Build and install the library

Refer to repository README for installation instructions.

3. Build the collector, processor, and/or publisher plugins in the examples folder.

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

4. Launch example task in examples directory:

$ cd examples
$ ./run.sh

5. Verify that the tasks are running:

$ 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