[collectd] how to create more graphs wwith one perl script

Sebastian Harl sh at tokkee.org
Mon Nov 23 13:11:39 CET 2009

Hi Frank,

On Sun, Nov 22, 2009 at 05:06:47PM +0100, Frank Kellner wrote:
> at first please excuse my bad english.

Don't worry about that … ;-)

> When I start collectd with the option -T I get this message
> LOG: 4 - perl: Collectd::plugin_dispatch_values with two arguments is
> deprecated - pass the type through values->{type}.

This tells you that the interface has changed and that the compatibility
layer will be removed in the future. Instead of

  Collectd::plugin_dispatch_values ('Energymeter', $vl);

you should do

  $vl->{'type'} = 'Energymeter';
  Collectd::plugin_dispatch_values ($vl);

See the collectd-perl(5) manpage for details.

> At this time I get only one rrd-file with the four values.
> What is the right way to get four single rrd-files?

The number of values in an RRD file is defined by the number of elements
in the dataset. So, if you want four different files with a single value
(in terms of RRDtool, this is called a "data-source"), you have to
define four different datasets (or use some appropriate type which is
already available in the default types.db -- see the types.db(5) manpage
for details). Then you need to call Collectd::plugin_dispatch_values()
four times, setting $vl->{'type'} to the name of the appropriate data
set for each call.


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/20091123/91514c59/attachment.pgp 

More information about the collectd mailing list