summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5f423a1)
raw | patch | inline | side by side (parent: 5f423a1)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 27 Apr 2008 18:57:34 +0000 (20:57 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 30 Apr 2008 08:40:50 +0000 (10:40 +0200) |
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/collectd-perl.pod | patch | blob | history |
diff --git a/src/collectd-perl.pod b/src/collectd-perl.pod
index 4a01d1465b90a9e37986416f4a49b88649b0a5e8..8cdf08bb3b6807229bb4a985a5b01f74771f8378 100644 (file)
--- a/src/collectd-perl.pod
+++ b/src/collectd-perl.pod
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<callback functions> are known to collectd
-(all of these are optional):
+(all of them are optional):
=over 4
This type of function is used to write the dispatched values. It is called
once for each call to B<plugin_dispatch_values>.
+=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
=item TYPE_WRITE
+=item TYPE_FLUSH
+
=item TYPE_LOG
=item TYPE_NOTIF
=item TYPE_SHUTDOWN
-No arguments are passed
+No arguments are passed.
=item TYPE_WRITE
The arguments passed are I<type>, I<data-set>, and I<value-list>. I<type> is a
string. For the layout of I<data-set> and I<value-list> see above.
+=item TYPE_FLUSH
+
+The only argument passed is I<timeout> which indicates that only data older
+than I<timeout> seconds is to be flushed.
+
=item TYPE_LOG
The arguments are I<log-level> and I<message>. 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<plugin_flush> ([B<timeout> => I<timeout>,] [B<plugins> => I<...>])
+
+Flush one or more plugins. I<timeout> is passed on to the registered
+flush-callbacks. If omitted, C<-1> is used. If the I<plugins> 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<plugin_flush_one> (I<timeout>, I<plugin>)
+
+This is identical to using "plugin_flush (timeout =E<gt> I<timeout>, plugins
+=E<gt> I<plugin>".
+
+=item B<plugin_flush_all> (I<timeout>)
+
+This is identical to using "plugin_flush (timeout =E<gt> I<timeout>)".
+
=item B<plugin_dispatch_notification> (I<notification>)
Submits a I<notification> to the daemon which will then pass it to all
=item B<plugin_dispatch_values> ()
+=item B<plugin_flush> ()
+
+=item B<plugin_flush_one> ()
+
+=item B<plugin_flush_all> ()
+
=item B<plugin_dispatch_notification> ()
=item B<plugin_log> ()
=item B<TYPE_WRITE>
+=item B<TYPE_FLUSH>
+
=item B<TYPE_SHUTDOWN>
=item B<TYPE_LOG>
=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<perl> as
+plugin name when doing so.
+
+=back
+
=head1 SEE ALSO
L<collectd(1)>,