Re: [collectd] Issue With Graphite Perl Plugin

2011-07-06 Thread Sebastian Harl
Hi,

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

 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.

HTH,
Sebastian

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



signature.asc
Description: Digital signature
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] curl_json fails to build against YAJL-2.0.x

2011-07-06 Thread Johan Bergström
Hey,

On Jul 4, 2011, at 11:30 , Grzegorz Nosek wrote:

 W dniu 04.07.2011 11:22, Johan Bergström pisze:
 Thanks for the patch, looks like we're still not there though (FWIW, this is 
 GCC 4.5.2):
 
 /bin/sh ../libtool  --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc 
 -DHAVE_CONFIG_H -I.-Wall -Werror  -O2 -pipe -c -o 
 curl_json_la-curl_json.lo `test -f 'curl_json.c' || echo './'`curl_json.c
 libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -Wall -Werror 
 -O2 -pipe -c curl_json.c  -fPIC -DPIC -o .libs/curl_json_la-curl_json.o
 cc1: warnings being treated as errors
 curl_json.c:257:3: error: initialization from incompatible pointer type
 curl_json.c:258:3: error: initialization from incompatible pointer type
 curl_json.c:260:3: error: initialization from incompatible pointer type
 curl_json.c: In function 'cj_curl_perform':
 curl_json.c:699:3: error: too few arguments to function 'yajl_alloc'
 /usr/include/yajl/yajl_parse.h:130:26: note: declared here
 curl_json.c:732:3: error: implicit declaration of function 
 'yajl_complete_parse'
 make[3]: *** [curl_json_la-curl_json.lo] Error 1
 
 Not sure how arch got this through?
 
 Not sure either, but it builds without problems on my Arch machine (collectd 
 5.0.0, yajl 2.0.2-1, no relevant patches other than what I sent).
 
 Care to provide the functions with compile errors as you see them? Try 
 reverting to vanilla curl_json.c and applying the patch again.

Never mind. Somehow mixed the paths to YAJL - so I built against 1.X in above 
case.

 
 Best regards,
 Grzegorz Nosek

Kind regards,
Johan
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] Issue With Graphite Perl Plugin

2011-07-06 Thread Sebastian Harl
Hi again,

On Wed, Jul 06, 2011 at 07:22:17AM -0500, Tom Purl wrote:
 On 7/6/11, Sebastian Harl s...@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 :)

Great :-)

Some screenshots would be nice as well, btw. ;-)

  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@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?

Sorry, I forgot to mention that you need libltdl as well. libtool is the
command line program used at build time while that lib is used by
collectd. In Ubuntu, the required package should be libltdl-dev.

  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
[…]
 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.

Hrm, that should still work … anyway, I don't currently have time to see
why that could fail.

 Am I getting this because of the missing libtool dependency?

Right.

 Also, why do you suppose it's looking for
 a Perl 5.10 plugin if I'm using 5.10.1?

The 5.10 directory is a symlink to the latest Perl version, i.e.
5.10.1 in your case.

HTH,
Sebastian

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



signature.asc
Description: Digital signature
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


[collectd] On rrdtool CacheTimeout

2011-07-06 Thread Trent W. Buck
I rolled out collectd 4.8, running in each of about 20 LXC jails.  The
I/O load was crippling the server, so I reduced polling with Interval
60 in each jail.

However I would prefer to

 - poll every 10s (the default);

 - batch write RRDs, such that any given RRD is only written once
   every ten minutes; and

 - distribute these writes more-or-less evenly over time, i.e. avoid a
   huge I/O spike on the tenth minute.

IIUC that means I should use this config:

Interval  10
CacheTimeout  600
RandomTimeout 300

But this doesn't seem to be improving matters.  Polling dm-25 (the
filesystem mounted at /var/lib/collectd) every ten seconds, before the
change:

Device:tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
dm-25   163.7016.80  1292.80168  12928
dm-2588.90 4.00   707.20 40   7072
dm-25   279.20 8.80  2224.80 88  22248
dm-25   302.40 8.80  2410.40 88  24104
dm-25   122.40 7.20   972.00 72   9720
dm-25   386.90 7.20  3088.00 72  30880

After the change:

Device:tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
dm-2533.2011.20   254.40112   2544
dm-25   292.1012.00  2324.80120  23248
dm-25   297.5015.20  2364.80152  23648
dm-2541.90 8.80   326.40 88   3264
dm-25   428.30 4.00  3422.40 40  34224
dm-25   283.60 4.80  2264.00 48  22640

Is that wrong, or am I just expecting too much of buffered rrd writes?

___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd