1COLLECTD-NAGIOS(1)                 collectd                 COLLECTD-NAGIOS(1)
2
3
4

NAME

6       collectd-nagios - Nagios plugin for querying collectd
7

SYNOPSIS

9       collectd-nagios -s socket -n value_spec -H hostname [options]
10

DESCRIPTION

12       This small program is the glue between collectd and nagios. collectd
13       collects various performance statistics which it provides via the
14       "unixsock plugin", see collectd-unixsock(5). This program is called by
15       Nagios, connects to the UNIX socket and reads the values from collectd.
16       It then returns OKAY, WARNING or CRITICAL depending on the values and
17       the ranges provided by Nagios.
18

ARGUMENTS AND OPTIONS

20       The following arguments and options are required and understood by
21       collectd-nagios. The order of the arguments generally doesn't matter,
22       as long as no argument is passed more than once.
23
24       -s socket
25           Path of the UNIX socket opened by collectd's "unixsock plugin".
26
27       -n value_spec
28           The value to read from collectd. The argument is in the form
29           "plugin[-instance]/type[-instance]".
30
31       -H hostname
32           Hostname to query the values for.
33
34       -d data_source
35           Each value_spec may be made of multiple "data sources". With this
36           option you can select one or more data sources. To select multiple
37           data sources simply specify this option again. If multiple data
38           sources are examined they are handled according to the
39           consolidation function given with the -g option.
40
41       -g none|average|sum
42           When multiple data sources are selected from a value spec, they can
43           be handled differently depending on this option. The values of the
44           following meaning:
45
46           none
47               No consolidation if done and the warning and critical regions
48               are applied to each value independently.
49
50           average
51               The warning and critical ranges are applied to the average of
52               all values.
53
54           sum The warning and critical ranges are applied to the sum of all
55               values.
56
57           percentage
58               The warning and critical ranges are applied to the ratio (in
59               percent) of the first value and the sum of all values. A
60               warning is returned if the first value is not defined or if all
61               values sum up to zero.
62
63       -c range
64       -w range
65           Set the critical (-c) and warning (-w) ranges. These options mostly
66           follow the normal syntax of Nagios plugins. The general format is
67           "min:max". If a value is smaller than min or bigger than max, a
68           warning or critical status is returned, otherwise the status is
69           success.
70
71           The tilde sign (~) can be used to explicitly specify infinity. If ~
72           is used as a min value, negative infinity is used. In case of max,
73           it is interpreted as positive infinity.
74
75           If the first character of the range is the at sign (@), the meaning
76           of the range will be inverted. I. e. all values within the range
77           will yield a warning or critical status, while all values outside
78           the range will result in a success status.
79
80           min (and the colon) may be omitted, min is then assumed to be zero.
81           If max (but not the trailing colon) is omitted, max is assumed to
82           be positive infinity.
83
84       -m  If this option is given, "Not a Number" (NaN) is treated as
85           critical. By default, the none consolidation reports NaNs as
86           warning. Other consolidations simply ignore NaN values.
87

RETURN VALUE

89       As usual for Nagios plugins, this program writes a short, one line
90       status message to STDOUT and signals success or failure with its return
91       value. It exits with a return value of 0 for success, 1 for warning and
92       2 for critical. If the values are not available or some other error
93       occurred, it returns 3 for unknown.
94

SEE ALSO

96       collectd(1), collectd.conf(5), collectd-unixsock(5),
97       <http://nagios.org/>
98

AUTHOR

100       Florian Forster <octo at collectd.org>
101
102
103
1045.9.2                             2019-09-16                COLLECTD-NAGIOS(1)
Impressum