X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcollectd-perl.pod;h=38d790e9b19307bf7db402a65adf1f6696b2aae5;hp=bacf8850f8443b5207b9287d1069018e0089cad5;hb=633c3966f770e4d46651a2fe219a18d8a9907a9f;hpb=3ea3b96ec7fe3e2f907bfe6e471d1eaf35b49eee diff --git a/src/collectd-perl.pod b/src/collectd-perl.pod index bacf8850..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', @@ -400,23 +402,6 @@ argument has been specified, only named plugins will be flushed. The value of the B and B arguments may either be a string or a reference to an array of strings. -=item B (I, I) - -This is identical to using "plugin_flush (timeout =E I, plugins -=E I". - -B: Starting with version 4.5 of collectd, B has been -deprecated and will be removed in some future version of collectd. Use -B instead. - -=item B (I) - -This is identical to using "plugin_flush (timeout =E I)". - -B: Starting with version 4.5 of collectd, B has been -deprecated and will be removed in some future version of collectd. Use -B instead. - =item B (I) Submits a I to the daemon which will then pass it to all @@ -432,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. @@ -511,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. @@ -673,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; } @@ -719,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. @@ -799,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