agent
This library is a tool for writing netdata plugins.
We strongly believe that custom plugins are very important and they must be easy to write.
Definitions:
orchestrator
plugin orchestrators are external plugins that do not collect any data by themselves. Instead they support data collection modules written in the language of the orchestrator. Usually the orchestrator provides a higher level abstraction, making it ideal for writing new data collection modules with the minimum of code.
plugin
plugin is a set of data collection modules.
module
module is a data collector. It collects, processes and returns processed data to the orchestrator.
job
job is a module instance with specific settings.
Package provides:
- CLI parser
- plugin orchestrator (loads configurations, creates and serves jobs)
You are responsible only for creating modules.
#
Custom plugin example#
How to write a ModuleModule is responsible for charts creating and data collecting. Implement Module interface and that is it.
#
How to write a PluginSince plugin is a set of modules all you need is:
- write module(s)
- add module(s) to the plugins registry
- start the plugin
#
How to integrate your plugin into NetdataThree simple steps:
- move the plugin to the
plugins.d
dir. - add plugin configuration file to the
etc/netdata/
dir. - add modules configuration files to the
etc/netdata/<DIR_NAME>/
dir.
Congratulations!
#
ConfigurationsConfigurations are written in YAML.
- plugin configuration:
- module configuration
Plugin uses yaml.Unmarshal
to add configuration parameters to the module. Please use yaml
tags!
#
DebugPlugin CLI:
Specific module debug:
Change <plugin_name>
to your plugin name and <module_name>
to the module name you want to debug.