From: Florian Forster Date: Fri, 30 Mar 2007 20:03:52 +0000 (+0200) Subject: exec plugin: Updated the documentation and sample configfile. X-Git-Tag: collectd-4.0.0~118 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cd9f575473775152f0a8ff31be5679b9a56a697f;p=collectd.git exec plugin: Updated the documentation and sample configfile. --- diff --git a/src/collectd.conf.in b/src/collectd.conf.in index 5221c56c..02a6eae3 100644 --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@ -84,6 +84,10 @@ # MaxConns 5 # +# +# Exec user "/path/to/exec" +# + # # Host "127.0.0.1" # Port 7634 diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 6fc167b5..2ddc5cba 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -210,6 +210,20 @@ at most B<16384> to prevent typos and dumb mistakes. =back +=head2 Plugin C + +Please make sure to read L before using this +plugin. It containes valueable information on when the executable is executed +and the output that is expected from it. + +=over 4 + +=item B I I + +Execute the executable I as user I. + +=back + =head2 Plugin C =over 4 diff --git a/src/collectd.pod b/src/collectd.pod index 96c3fcdb..bc65f57d 100644 --- a/src/collectd.pod +++ b/src/collectd.pod @@ -219,6 +219,39 @@ Successful spam checks (e.g. "BAYES_99", "SUBJECT_DRUG_GAP_C", ...): Each line is limited to 256 characters (including the newline character). Longer lines will be ignored. +=head2 exec + +The C plugin forks of an executable and reads back values that it writes +to C. The executable is forked kind of as L does: It is forked +once and not again until it exits. If it exited, it will be forked again after +at most I seconds. It is perfectly legal for the executable to run +for a long time and continuously write values to C. + +The forked executable is expected to print values to C. The expected +format is as follows: + +=over 4 + +=item + +Each line beginning with a C<#> (hash mark) is ignored. + +=item + +Any other line must be of the form C,I,I>, where +I is either B or B, I may not contain +C<,> (comma), C (slash) and C<\0> (null byte) and I is either an +integer (if I is B) or a floating-point number (if I is +B). + +=back + +The values are always considered to be "fresh", i.Ee. the time is set to +"now". + +When collectd exits it sends a B to all still running +child-processes upon which they have to quit. + =head2 mysql Requires B to be installed. It connects to the database when