[collectd] Issue With Graphite Perl Plugin

Tom Purl tom at tompurl.com
Wed Jul 6 14:22:17 CEST 2011


On 7/6/11, Sebastian Harl <sh at tokkee.org> wrote:
> 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> ;-)

I'll be happy to once I get it up-and-running :)

> 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
> explicitly.

Thanks for clarifying!

>> 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 ;-)

How do I explicitly enable libtool 2 when I compile? Here's the
version of that libtool that I have on the system now (and when I
compiled 5.0):

    tom at millhouse:/opt/collectd/sbin$ sudo dpkg -l |grep libtool
    ii  libtool                          2.2.6b-2ubuntu1
                  Generic library support script

I don't see an explicit libtool option for the configure script. Is
there something I'm missing?

>> 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.

Thanks! I set my IncludeDir value to "/opt/collectd/share/perl/5.10.1"
and restarted, so I'm not getting that error any more. Unfortunately,
I'm now getting this error:

Can't load '/usr/lib/perl/5.10/auto/threads/threads.so' for module
threads: /usr/lib/perl/5.10/auto/threads/threads.so: undefined symbol:
PL_no_mem at /usr/lib/perl/5.10/XSLoader.pm line 70.
 at /usr/lib/perl/5.10/threads.pm line 32
Compilation failed in require at
/opt/collectd/share/perl/5.10.1/Collectd.pm line 27.
BEGIN failed--compilation aborted at
/opt/collectd/share/perl/5.10.1/Collectd.pm line 27.
Compilation failed in require.
BEGIN failed--compilation aborted.
[2011-07-06 07:15:47] perl: init_pi: Unable to bootstrap Collectd:
Can't load '/usr/lib/perl/5.10/auto/threads/threads.so' for module
threads: /usr/lib/perl/5.10/auto/threads/threads.so: undefined symbol:
PL_no_mem at /usr/lib/perl/5.10/XSLoader.pm line 70.
 at /usr/lib/perl/5.10/threads.pm line 32
Compilation failed in require at
/opt/collectd/share/perl/5.10.1/Collectd.pm line 27.
BEGIN failed--compilation aborted at
/opt/collectd/share/perl/5.10.1/Collectd.pm line 27.
Compilation failed in require.
BEGIN failed--compilation aborted
[2011-07-06 07:15:47] perl: Configuration failed with a fatal error -
plugin disabled!

I found a few posts that said I should run this before I start collectd:

    export LD_PRELOAD=/usr/lib/libperl.so.5.10.1

However, this didn't seem to help. Am I getting this because of the
missing libtool dependency? Also, why do you suppose it's looking for
a Perl 5.10 plugin if I'm using 5.10.1?

Thanks again for all of your help Sebastian!

Tom Purl



More information about the collectd mailing list