X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcollectd-perl.pod;h=38d790e9b19307bf7db402a65adf1f6696b2aae5;hp=6b44722cfe808605603a549ac3690c5998bb1eb7;hb=633c3966f770e4d46651a2fe219a18d8a9907a9f;hpb=4dc9287f4de0283ae986444377075dcbdada2871 diff --git a/src/collectd-perl.pod b/src/collectd-perl.pod index 6b44722c..38d790e9 100644 --- a/src/collectd-perl.pod +++ b/src/collectd-perl.pod @@ -1,3 +1,5 @@ +=encoding UTF-8 + =head1 NAME collectd-perl - Documentation of collectd's C @@ -208,7 +210,7 @@ layout looks like this: { values => [123, 0.5], time => time (), - interval => $interval_g, + interval => plugin_get_interval (), host => $hostname_g, plugin => 'myplugin', type => 'myplugin', @@ -415,6 +417,13 @@ The message is passed to all log-callbacks that are registered with collectd. Wrappers around B, using B, B, B, B and B respectively as I. +=item B () + +Returns the interval of the current plugin as a floating point number in +seconds. This value depends on the interval configured within the +C block or the global interval (see L for +details). + =back The following function provides the filter chain C-interface to Perl-modules. @@ -494,6 +503,11 @@ B configuration options (see L for details). This variable keeps the interval in seconds in which the read functions are queried (see the B configuration option). +B This variable should no longer be used in favor of +C (see above). This function takes any plugin-specific +interval settings into account (see the C option of C in +L for details). + =back Any changes to these variables will be globally visible in collectd. @@ -656,9 +670,9 @@ A very simple read function might look like: sub foobar_read { - my $vl = { plugin => 'foobar' }; + my $vl = { plugin => 'foobar', type => 'gauge' }; $vl->{'values'} = [ rand(42) ]; - plugin_dispatch_values ('gauge', $vl); + plugin_dispatch_values ($vl); return 1; } @@ -702,7 +716,7 @@ types used by the read, write and match functions. =item Please feel free to send in new plugins to collectd's mailing list at -EcollectdEatEverplant.orgE for review and, possibly, +EcollectdEatEcollectd.orgE for review and, possibly, inclusion in the main distribution. In the latter case, we will take care of keeping the plugin up to date and adapting it to new versions of collectd. @@ -782,7 +796,7 @@ The C has been written by Sebastian Harl EshEatEtokkee.orgE. This manpage has been written by Florian Forster -EoctoEatEverplant.orgE and Sebastian Harl +EoctoEatEcollectd.orgE and Sebastian Harl EshEatEtokkee.orgE. =cut