[collectd] Issue With Graphite Perl Plugin

Sebastian Harl sh at tokkee.org
Wed Jul 6 09:52:37 CEST 2011


On Tue, Jul 05, 2011 at 08:56:43PM -0500, Tom Purl wrote:
> I then tried to use the collectd-graphite plugin
> (https://github.com/joemiller/collectd-graphite).

Oh, I didn't know about this plugin yet … sounds quite interesting.
Would you (or somebody else) mind adding a page to the wiki and add it
to <http://collectd.org/wiki/index.php/List_of_front-ends> ;-)

> It uses the perl
> plugin, so I added the following to my config file:
> LoadPlugin perl
> <Plugin "perl">
>         IncludeDir "/usr/local/share/perl/5.10.1"
>         BaseName "Collectd::Plugins"
>         LoadPlugin "Graphite"
>         <Plugin "Graphite">
>           Buffer "256000"
>           Prefix "servers"
>           Host   "localhost"
>           Port   "2003"
>         </Plugin>
> </Plugin>
> I know that I didn't set the Global property to "true", but from what
> I understand, that's not necessary in the 5.0 version of collectd.

collectd 5.0 automatically sets that flag for some plugins (those, that
are known to benefit from that). So, the flag is required (when using
plugins that are [in parts] written in C) but it does not have to be set

> Then, when I try to start collectd, I get the following errors:
> [2011-07-05 20:42:31] plugin_load_file: The global flag is not
> supported, libtool 2 is required for this.

This is a result of automatically adding the global flag for the perl
plugin (NB: we should check for libtool 2 as well, when automatically
setting that flag). I suggest to recompile collectd with libtool 2
(which is available since Ubuntu Lucid) even though that might not be
necessary in your case … but better be sure and safe for the future ;-)

> [2011-07-05 20:42:31] perl: Initializing Perl interpreter...
> Can't locate Collectd.pm in @INC (@INC contains:
> /usr/local/share/perl/5.10.1 /etc/perl /usr/local/lib/perl/5.10.1
> /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5
> /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .).
> BEGIN failed--compilation aborted.

> Here's the contents of my "/usr/local/share/perl/5.10.1" directory:
> ./Collectd
> ./Collectd/Plugins
> ./Collectd/Plugins/Graphite.pm
> These files should be readable by the collectd daemon because it is
> running as root.
> So it appears to me that collectd can't find Collectd.pm in
> /usr/local/share/perl/5.10.1, but that should be ok since a Collectd
> folder is in there, right?

Nope, you need Collectd.pm as well … that's part of the perl plugin
(implemented in plain Perl). It should have been installed during 'make
install' as well. The default is ${prefix}/share/perl/<perl_version/
(${prefix} defaults to /opt/collectd/). Either copy Collectd.pm to any
of the directories in @INC (see above) or add the path to Collectd.pm to
the "IncludeDir" config option.

> Does anyone have any idea what I'm doing wrong? Is this an issue with
> the perl plugin, or should I contact the author of the
> collectd-graphite plugin?

Making Collectd.pm available to the perl plugin should fix your problem.
As a second step, I recommend to recompile with libtool2 -- else, some
third-party perl modules cannot be used with the perl plugin.


Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110706/14154078/attachment.pgp>

More information about the collectd mailing list