collectd-exec(5): Corrected/added some information.
[collectd.git] / src / collectd-exec.pod
1 =head1 NAME
2
3 collectd-exec - Documentation of collectd's C<exec plugin>
4
5 =head1 SYNOPSIS
6
7   # See collectd.conf(5)
8   LoadPlugin exec
9   # ...
10   <Plugin exec>
11     Exec myuser myprog
12     Exec otheruser /path/to/another/binary
13   </Plugin>
14
15 =head1 DESCRIPTION
16
17 The C<exec plugin> forks of an executable and reads back values that it writes
18 to C<STDOUT>. The executable is forked in a fassion similar to L<init>: It is
19 forked once and not again until it exits. If it exited, it will be forked again
20 after at most I<Interval> seconds. It is perfectly legal for the executable to
21 run for a long time and continuously write values to C<STDOUT>.
22
23 =head1 DATA FORMAT
24
25 The forked executable is expected to print values to C<STDOUT>. The expected
26 format is as follows:
27
28 =over 4
29
30 =item
31
32 Each line beginning with a C<#> (hash mark) is ignored.
33
34 =item
35
36 Any other line must be of the form C<I<type>,I<type-instance>,I<value>>, where
37 I<type> is either B<counter> or B<gauge>, I<type-instance> may not contain
38 C<,> (comma), C</> (slash) and C<\0> (null byte) and I<value> is either an
39 integer (if I<type> is B<counter>) or a floating-point number (if I<type> is
40 B<gauge>).
41
42 =back
43
44 The values are always considered to be "fresh", i.E<nbsp>e. the time is set to
45 "now".
46
47 When collectd exits it sends a B<SIGTERM> to all still running
48 child-processes upon which they have to quit.
49
50 =head1 CAVEATS
51
52 =over 4
53
54 =item
55
56 If the executable only writes one value and then exits I will be executed every
57 I<Interval> seconds. If I<Interval> is short (the default is 10 seconds) this
58 may result in serious system load.
59
60 =item
61
62 The user, the binary is executed as, may not have root privileges, i.E<nbsp>e.
63 must have an UID that is non-zero.
64
65 =back
66
67 =head1 SEE ALSO
68
69 L<collectd(1)>, L<collectd.conf(5)>, L<fork(2)>, L<exec(3)>
70
71 =head1 AUTHOR
72
73 Florian Forster E<lt>octo@verplant.orgE<gt>
74
75 =cut