Collectd - Perl/Python plugin - registration functions not working
<p>I would like to ask about Collectd's plugins Perl and Python and their registration functions. </p>

<p>I tried to code plugin in Perl (and also in Python), set up read and write functions and after that register them into Collectd (plugin_register functions). In all cases it wasnt working. Everytime, the logs show:</p>

<blockquote>
  <p>Found a configuration for the "my_plugin" plugin, but the plugin
  isn't loaded or didn't register a configuration callback.
  severity=warning</p>
</blockquote>

<p>I load my plugin in perl.conf.</p>

<p>Below I attach example of plugin which is directly from Collectd.perl documentation. This plugin, as well as my plugin, has the same result. </p>

<pre><code>package Collectd::Plugins::FooBar;
  use strict;
  use warnings;
  use Collectd qw( :all );

  sub foobar_read
    {
    my $vl = { plugin =&gt; 'foobar', type =&gt; 'gauge' };
    $vl-&gt;{'values'} = [ rand(42) ];
    plugin_dispatch_values ($vl);
    return 1;
    }
  sub foobar_write
    {
    my ($type, $ds, $vl) = @_;
    for (my $i = 0; $i &lt; scalar (@$ds); ++$i) {
      print "$vl-&gt;{'plugin'} ($vl-&gt;{'type'}): $vl-&gt;{'values'}-&gt;[$i]\n";
    }
    return 1;
    }

  sub foobar_match
    {
    my ($ds, $vl, $meta, $user_data) = @_;
    if (matches($ds, $vl)) {
      return FC_MATCH_MATCHES;
    } else {
      return FC_MATCH_NO_MATCH;
    }
    }

  plugin_register (TYPE_READ, "foobar", "foobar_read");
  plugin_register (TYPE_WRITE, "foobar", "foobar_write");
  fc_register (FC_MATCH, "foobar", "foobar_match");
</code></pre>

<p>Post your configuration if you can.</p>

<p>The documentation says that the <em><strong><code>LoadPlugin</code></strong></em> configuration goes in the collectd.conf file (not that that seems to matter in your case from your log file).</p>

<p>Put your foobar.pm module at <strong><em><code>/path/to/perl/plugins/Collectd/Plugins/FoorBar.pm</code></em></strong> matching it with the path that you specified ... (match the case of names of plugin and plugin pm file).</p>

<pre><code>LoadPlugin perl
# ...
&lt;Plugin perl&gt;
  IncludeDir "/path/to/perl/plugins"
  BaseName "Collectd::Plugins"
  EnableDebugger ""
  LoadPlugin "FooBar"

  &lt;Plugin FooBar&gt;
    Foo "Bar"
  &lt;/Plugin&gt;
&lt;/Plugin&gt;
</code></pre>

python perl plugins registration collectd