[collectd] Assigning metadata to multiple plugins

Ervin Weber webervin at gmail.com
Wed Aug 15 15:09:49 CEST 2018


Hello I am using Include directive to have separate files describing
separate plugins (that approach makes automation easier). I have
custom Exec plugins, (basicaly bash file looping and printing values
to stdout). This works fine and data is collected and processed as
intended. However I need plugins to have custom metadata, to fine tune
how their data is processed.

I found no way to set Exec plugin metadata from plugin itself.
Ideallybash script could output something to stdout that would get
added as metadata keys and values before starting values loop, but I
was unable to find anythig similar in documentation.

After that I attempted to follow instructions in
https://cloud.google.com/monitoring/agent/custom-metrics-agent#your_filter_chain
and use similar chain for adding metadata. It works fine for single
plugin configuration. However, it seems that only single PreCacheChain
is supported. If I define another chain (in different included
configuration file)  to be PreCacheChain  then previous value of this
parmeter is simply discarded and only last (seems that includes get
loaded in alphanumerical way) assigned chain gets executed.

How would it be posible to have metadata for different plugins added
and removed just by adding and removing files in filesystem instead of
having to resort to templates/awk or other means to write single chain
dealing with all plugins at once?



More information about the collectd mailing list