[collectd] home grown perl module: configuration callback not working

Andreas Schuldei andreas at schuldei.org
Wed Feb 22 19:20:06 CET 2017


found it: the plugin name in the config file needs to be lower case.

On Wed, Feb 22, 2017 at 5:31 PM Andreas Schuldei <andreas at schuldei.org>
wrote:

> Hi,
>
> I am writing a perl module for collecting data.
>
> These are my plugin registration calls:
> =====
> plugin_register(TYPE_READ, $plugin_name, 'my_read');
> plugin_register(TYPE_CONFIG, $plugin_name, 'my_config');
> plugin_register(TYPE_INIT, $plugin_name, 'my_init');
> =====
>
> When starting collectd I get in the logfile:
> ===========
> Feb 22 16:52:42 lazarus collectd[28359]: perl: Found a configuration for
> the "OneWireCtlr" plugin, but the plugin isn't loaded or didn't register a
> configuration callback.
> ===========
>
> I added some debug output to my_read, my_config and my_init, and surely,
> the my_config function is never called - the other two are.
>
> the configuration in collectd.conf looks like this:
> =====
> [... some more ...]
> <Plugin perl>
>            BaseName "Collectd::Plugins"
>   LoadPlugin "OneWireCtlr"
>   <Plugin OneWireCtlr>
>      host "WIZ107SR-51908C.fritz.box"
> <0F00000561159F28>
>         type "temperature"
>   name "Sicherungskasten"
>        </0F00000561159F28>
>   <F50000000F93691D_1>
> type "counter"
> name "Stromzähler Familie"
> </F50000000F93691D_1>
>   <F50000000F93691D_2>
> type "counter"
> name "Stromzähler Single"
> </F50000000F93691D_2>
>   </Plugin>
> </Plugin>
> =====
>
> what can I do to make this work?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20170222/4ce57dd3/attachment-0001.html>


More information about the collectd mailing list