[collectd] perl plugin TYPE_CONFIG examples?

collectd at faxm0dem.org collectd at faxm0dem.org
Wed Jan 7 08:54:27 CET 2015


Hi Andreas,

On Tue, Jan 06, 2015 at 01:22:33PM +0100, Andreas Schuldei wrote:
> Each subsection of the configuration of my plugin should cause one FooBar
> plugin to be invoked with the specific Foo value going to their own
> instance each.
> 
> Does this actually work like this?

It can work like this if you want it to.
The thing is, you need to parse the config yourself, and do whatever you
like with it. The way we do it [1] is recursively parse the config structure
passed by the XS code (patches welcome!).
There are a couple more examples in my repos [2] although they might be a
bit outdated (sorry).

I hope this helps

[1] https://github.com/faxm0dem/Collectd-Plugins-Common/blob/Collectd-Plugins-Common/lib/Collectd/Plugins/Common.pm#L40-65
[2] https://github.com/search?q=user%3Afaxm0dem+collectd



More information about the collectd mailing list