docs/EXTERNAL_PLUGINS.md
External plugins are external programs that are built
outside of Telegraf that can run through an execd plugin. These external
plugins allow for more flexibility compared to internal Telegraf plugins.
The guidelines of writing external plugins would follow those for our general input, output, processor, and aggregator plugins. Please reference the documentation on how to create these plugins written in Go.
For listed external plugins, the author of the external plugin is also responsible for the maintenance and feature development of external plugins. Expect to have users open plugin issues on its respective GitHub repository.
For Go plugins, there is a Execd Go Shim that will make
it trivial to extract an internal input, processor, or output plugin from the
main Telegraf repo out to a stand-alone repo. This shim allows anyone to build
and run it as a separate app using one of the execd plugins:
Follow the Steps to externalize a plugin and Steps to build and run your plugin to properly with the Execd Go Shim.
This is a guide to help you set up a plugin to use it with execd:
plugins/inputs/cpu, it is recommended that it also be under
plugins/inputs/cpu in the new repo. For a further example of what this
might look like, take a look at ssoroka/rand or
danielnelson/telegraf-execd-openvpn.cmd folder. This will be the entrypoint to the plugin when run as
a stand-alone program and it will call the shim code for you to make that
happen. It is recommended to have only one plugin per repo, as the shim is
not designed to run multiple plugins at the same time.
_ "github.com/me/my-plugin-telegraf/plugins/inputs/cpu"
execd plugin. Please refer to
openvpn install and awsalarms install for examples. Include the
following steps:
telegraf.conf