From: Sebastian Harl Date: Sun, 27 Apr 2008 18:57:34 +0000 (+0200) Subject: collectd-perl(5): Documented the support for flush callbacks. X-Git-Tag: collectd-4.4.0~25 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0fb622abbe7df8156cb89adc19d028e629054aed;p=collectd.git collectd-perl(5): Documented the support for flush callbacks. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/collectd-perl.pod b/src/collectd-perl.pod index 4a01d146..8cdf08bb 100644 --- a/src/collectd-perl.pod +++ b/src/collectd-perl.pod @@ -67,7 +67,7 @@ registered by the plugins. Any plugin basically consists of the implementation of these callback functions and initializing code which registers the functions with collectd. See the section "EXAMPLES" below for a really basic example. The following types of B are known to collectd -(all of these are optional): +(all of them are optional): =over 4 @@ -92,6 +92,12 @@ amount of time until it returns B again. This type of function is used to write the dispatched values. It is called once for each call to B. +=item flush functions + +This type of function is used to flush internal caches of plugins. It is +usually triggered by the user only. Any plugin which caches data before +writing it to disk should provide this kind of callback function. + =item log functions This type of function is used to pass messages of plugins or the daemon itself @@ -203,6 +209,8 @@ I can be one of: =item TYPE_WRITE +=item TYPE_FLUSH + =item TYPE_LOG =item TYPE_NOTIF @@ -245,13 +253,18 @@ arguments: =item TYPE_SHUTDOWN -No arguments are passed +No arguments are passed. =item TYPE_WRITE The arguments passed are I, I, and I. I is a string. For the layout of I and I see above. +=item TYPE_FLUSH + +The only argument passed is I which indicates that only data older +than I seconds is to be flushed. + =item TYPE_LOG The arguments are I and I. The log level is small for @@ -279,6 +292,22 @@ 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. +=item B ([B => I,] [B => I<...>]) + +Flush one or more plugins. I is passed on to the registered +flush-callbacks. If omitted, C<-1> is used. If the I argument has +been specified, only named plugins will be flushed. The argument's value 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". + +=item B (I) + +This is identical to using "plugin_flush (timeout =E I)". + =item B (I) Submits a I to the daemon which will then pass it to all @@ -332,6 +361,12 @@ available (B<:all> will export all of them): =item B () +=item B () + +=item B () + +=item B () + =item B () =item B () @@ -348,6 +383,8 @@ available (B<:all> will export all of them): =item B +=item B + =item B =item B @@ -504,6 +541,18 @@ instead. =back +=head1 KNOWN BUGS + +=over 4 + +=item + +Currently, it is not possible to flush a single Perl plugin only. You can +either flush all Perl plugins or none at all and you have to use C as +plugin name when doing so. + +=back + =head1 SEE ALSO L,