X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fcollectd-perl.pod;h=38d790e9b19307bf7db402a65adf1f6696b2aae5;hp=5c11b65281cea66df6cf786f102e7abbb363ee0a;hb=633c3966f770e4d46651a2fe219a18d8a9907a9f;hpb=5c3e14a2937c7b1b14e6377b1285a36815ca5111 diff --git a/src/collectd-perl.pod b/src/collectd-perl.pod index 5c11b652..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', @@ -376,11 +378,6 @@ is found (and the number of values matches the number of data-sources) then the type, data-set and value-list is passed to all write-callbacks that are registered with the daemon. -B: Prior to version 4.4 of collectd, the data-set type used to be passed -as the first argument to B. This syntax is still supported -for backwards compatibility but has been deprecated and will be removed in -some future version of collectd. - =item B ([B => I<...>][, B => I<...>], B => I<...>) @@ -405,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 @@ -437,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. @@ -516,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. @@ -678,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; } @@ -724,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. @@ -804,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