-
Notifications
You must be signed in to change notification settings - Fork 0
Creating Plugins
Plugins are used to extend the functionality of the application by allowing developers to implement support for additional protocols/metrics or additional output support for result storage.
In order to successfully create plugins you need to have a good understanding of how the application manages threads. The application consists of 3 types of threads, these threads are defined as "the setup thread", "the packet processing thread/s" and "the reporting thread". Note. Only a single setup and reporting thread exists, however multiple packet processing threads may exist. Each of these threads are response for running a subset of the available events which can be found here.
Input plugins are used to implement the packet analysis and measurement logic into the system.
An example input plugin template is available here. Alternatively refer to the currently available input plugins.
Ouput plugins are used to export the results generated from input plugins into third-party application in order to perform analytics and/or visualizations with.
An example output plugin template is available here. Alternatively refer to the currently available output plugins.
Once your plugin is ready to be compiled you can include your plugin with libtrace-bigdata by performing the following:
- Move the plugin file(s) into the lib directory
- Include the plugin header file inside lib/bigdata.h
- Call the plugin initialization function in the init_modules() function found inside lib/bigdata.cc
- Add the plugin source files to bigdata_SOURCES inside lib/Makefile.am
- Add the plugins YAML configuration to the main configuration file
- Recompile the application with:
./configure
make
make install
- Test the plugin and create a pull request to include in the main application.