X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd-perl.pod;fp=src%2Fcollectd-perl.pod;h=b7ae9cace9c89f636172c1d27e5ccc5fbd4b3c9c;hb=cacaa2126020832df99fa6423147bd3de6d4faae;hp=5a58d357dd8ff5e7e1f5bc7988f66becfd4bea16;hpb=d98487a27d294e31f483b9d43e0d6c02717d248c;p=collectd.git diff --git a/src/collectd-perl.pod b/src/collectd-perl.pod index 5a58d357..b7ae9cac 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 @@ -204,6 +210,8 @@ I can be one of: =item TYPE_WRITE +=item TYPE_FLUSH + =item TYPE_LOG =item TYPE_NOTIF @@ -246,13 +254,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 @@ -286,6 +299,22 @@ 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<...>]) + +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 @@ -339,6 +368,12 @@ available (B<:all> will export all of them): =item B () +=item B () + +=item B () + +=item B () + =item B () =item B () @@ -355,6 +390,8 @@ available (B<:all> will export all of them): =item B +=item B + =item B =item B @@ -511,6 +548,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,