Merge branch 'sh/perl' into collectd-4
[collectd.git] / src / collectd-nagios.pod
1 =head1 NAME
2
3 collectd-nagios - Nagios plugin for querying collectd
4
5 =head1 SYNOPSIS
6
7 collectd-nagios B<-s> I<socket> B<-n> I<value_spec> B<-H> I<hostname> I<[options]>
8
9 =head1 DESCRIPTION
10
11 This small program is the glue between collectd and nagios. collectd collects
12 various performance statistics which is provides via the C<unixsock plugin>.
13 This program is called by Nagios, connects to the UNIX socket and reads the
14 values from collectd. It then returns B<OKAY>, B<WARNING> or B<CRITICAL>
15 depending on the values and the ranges provided by Nagios.
16
17 =head1 ARGUMENTS AND OPTIONS
18
19 The following arguments and options are required and understood by
20 collectd-nagios. The order of the arguments generally doesn't matter, as long
21 as no argument is passed more than once.
22
23 =over 4
24
25 =item B<-s> I<socket>
26
27 Path of the UNIX socket opened by collectd's C<unixsock plugin>.
28
29 =item B<-n> I<value_spec>
30
31 The value to read from collectd. The argument is in the form
32 C<plugin[-instance]/type[-instance]>.
33
34 =item B<-H> I<hostname>
35
36 Hostname to query the values for.
37
38 =item B<-d> I<data_source>
39
40 Each I<value_spec> may be made of multiple "data sources". With this option you
41 can select one or more data sources. To select multiple data sources simply
42 specify this option again. If multiple data sources are examined they are
43 handled according to the consolidation function given with the B<-g> option.
44
45 =item B<-g> B<none>I<|>B<average>I<|>B<sum>
46
47 When multiple data sources are selected from a value spec they can be handled
48 differently dependin on this option. The values of the following meaning:
49
50 =over 4
51
52 =item B<none>
53
54 No consolidation if done and the warning and critical regions are applied to
55 each value independently.
56
57 =item B<average>
58
59 The warning and critical ranges are applied to the average of all values.
60
61 =item B<sum>
62
63 The warning and critical ranges are applied to the sum of all values.
64
65 =back
66
67 =item B<-c> I<range>
68
69 =item B<-w> I<range>
70
71 Set the critical (B<-c>) and warning (B<-w>) ranges. These options mostly
72 follow the normal syntax of Nagios plugins. The general format is
73 "I<min>B<:>I<max>". If a value if smaller than I<min> or bigger than I<max> a
74 warning or critical is returned, otherwise okay is returned. I<min> (and the
75 colon) may be omitted and are then assumed to be zero. If I<max> (but not the
76 colon) is omitted I<max> is set to positive infinity. If either I<min> or
77 I<max> if set to B<~> they are set to negative and positive infinity,
78 respectively.
79
80 =back
81
82 =head1 RETURN VALUE
83
84 As usual for Nagios plugins this program writes a short, one line status
85 message to STDOUT and signals success or failure with it's return value. It
86 exists with a return value of B<0> for success or B<1> or B<2> for warning and
87 critical, respectively. If the values is not available or some other error
88 occured it returnes B<3> for "unknown". 
89
90 =head1 SEE ALSO
91
92 L<collectd(1)>, L<collectd.conf(5)>, L<http://nagios.org/>
93
94 =head1 AUTHOR
95
96 Florian Forster E<lt>octo@verplant.orgE<gt>
97
98 =cut