Code

Imported Upstream version 5.5.0
[pkg-collectd.git] / src / collectd-nagios.1
1 .\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is turned on, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .nr rF 0
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{
60 .    if \nF \{
61 .        de IX
62 .        tm Index:\\$1\t\\n%\t"\\$2"
63 ..
64 .        if !\nF==2 \{
65 .            nr % 0
66 .            nr F 2
67 .        \}
68 .    \}
69 .\}
70 .rr rF
71 .\"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
74 .    \" fudge factors for nroff and troff
75 .if n \{\
76 .    ds #H 0
77 .    ds #V .8m
78 .    ds #F .3m
79 .    ds #[ \f1
80 .    ds #] \fP
81 .\}
82 .if t \{\
83 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
84 .    ds #V .6m
85 .    ds #F 0
86 .    ds #[ \&
87 .    ds #] \&
88 .\}
89 .    \" simple accents for nroff and troff
90 .if n \{\
91 .    ds ' \&
92 .    ds ` \&
93 .    ds ^ \&
94 .    ds , \&
95 .    ds ~ ~
96 .    ds /
97 .\}
98 .if t \{\
99 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
105 .\}
106 .    \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 .    \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 .    \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
121 \{\
122 .    ds : e
123 .    ds 8 ss
124 .    ds o a
125 .    ds d- d\h'-1'\(ga
126 .    ds D- D\h'-1'\(hy
127 .    ds th \o'bp'
128 .    ds Th \o'LP'
129 .    ds ae ae
130 .    ds Ae AE
131 .\}
132 .rm #[ #] #H #V #F C
133 .\" ========================================================================
134 .\"
135 .IX Title "COLLECTD-NAGIOS 1"
136 .TH COLLECTD-NAGIOS 1 "2015-03-10" "5.4.1.805.g42e4d6c" "collectd"
137 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
139 .if n .ad l
140 .nh
141 .SH "NAME"
142 collectd\-nagios \- Nagios plugin for querying collectd
143 .SH "SYNOPSIS"
144 .IX Header "SYNOPSIS"
145 collectd-nagios \fB\-s\fR \fIsocket\fR \fB\-n\fR \fIvalue_spec\fR \fB\-H\fR \fIhostname\fR \fI[options]\fR
146 .SH "DESCRIPTION"
147 .IX Header "DESCRIPTION"
148 This small program is the glue between collectd and nagios. collectd collects
149 various performance statistics which it provides via the \f(CW\*(C`unixsock plugin\*(C'\fR,
150 see \fIcollectd\-unixsock\fR\|(5). This program is called by Nagios, connects to the
151 \&\s-1UNIX\s0 socket and reads the values from collectd. It then returns \fB\s-1OKAY\s0\fR,
152 \&\fB\s-1WARNING\s0\fR or \fB\s-1CRITICAL\s0\fR depending on the values and the ranges provided by
153 Nagios.
154 .SH "ARGUMENTS AND OPTIONS"
155 .IX Header "ARGUMENTS AND OPTIONS"
156 The following arguments and options are required and understood by
157 collectd-nagios. The order of the arguments generally doesn't matter, as long
158 as no argument is passed more than once.
159 .IP "\fB\-s\fR \fIsocket\fR" 4
160 .IX Item "-s socket"
161 Path of the \s-1UNIX\s0 socket opened by collectd's \f(CW\*(C`unixsock plugin\*(C'\fR.
162 .IP "\fB\-n\fR \fIvalue_spec\fR" 4
163 .IX Item "-n value_spec"
164 The value to read from collectd. The argument is in the form
165 \&\f(CW\*(C`plugin[\-instance]/type[\-instance]\*(C'\fR.
166 .IP "\fB\-H\fR \fIhostname\fR" 4
167 .IX Item "-H hostname"
168 Hostname to query the values for.
169 .IP "\fB\-d\fR \fIdata_source\fR" 4
170 .IX Item "-d data_source"
171 Each \fIvalue_spec\fR may be made of multiple \*(L"data sources\*(R". With this option you
172 can select one or more data sources. To select multiple data sources simply
173 specify this option again. If multiple data sources are examined they are
174 handled according to the consolidation function given with the \fB\-g\fR option.
175 .IP "\fB\-g\fR \fBnone\fR\fI|\fR\fBaverage\fR\fI|\fR\fBsum\fR" 4
176 .IX Item "-g none|average|sum"
177 When multiple data sources are selected from a value spec, they can be handled
178 differently depending on this option. The values of the following meaning:
179 .RS 4
180 .IP "\fBnone\fR" 4
181 .IX Item "none"
182 No consolidation if done and the warning and critical regions are applied to
183 each value independently.
184 .IP "\fBaverage\fR" 4
185 .IX Item "average"
186 The warning and critical ranges are applied to the average of all values.
187 .IP "\fBsum\fR" 4
188 .IX Item "sum"
189 The warning and critical ranges are applied to the sum of all values.
190 .IP "\fBpercentage\fR" 4
191 .IX Item "percentage"
192 The warning and critical ranges are applied to the ratio (in percent) of the
193 first value and the sum of all values. A warning is returned if the first
194 value is not defined or if all values sum up to zero.
195 .RE
196 .RS 4
197 .RE
198 .IP "\fB\-c\fR \fIrange\fR" 4
199 .IX Item "-c range"
200 .PD 0
201 .IP "\fB\-w\fR \fIrange\fR" 4
202 .IX Item "-w range"
203 .PD
204 Set the critical (\fB\-c\fR) and warning (\fB\-w\fR) ranges. These options mostly
205 follow the normal syntax of Nagios plugins. The general format is
206 "\fImin\fR\fB:\fR\fImax\fR". If a value is smaller than \fImin\fR or bigger than \fImax\fR, a
207 \&\fIwarning\fR or \fIcritical\fR status is returned, otherwise the status is
208 \&\fIsuccess\fR.
209 .Sp
210 The tilde sign (\fB~\fR) can be used to explicitly specify infinity. If \fB~\fR is
211 used as a \fImin\fR value, negative infinity is used. In case of \fImax\fR, it is
212 interpreted as positive infinity.
213 .Sp
214 If the first character of the \fIrange\fR is the at\ sign (\fB@\fR), the meaning
215 of the range will be inverted. I.\ e. all values \fIwithin\fR the range will
216 yield a \fIwarning\fR or \fIcritical\fR status, while all values \fIoutside\fR the range
217 will result in a \fIsuccess\fR status.
218 .Sp
219 \&\fImin\fR (and the colon) may be omitted,
220 \&\fImin\fR is then assumed to be zero. If \fImax\fR (but not the trailing colon) is
221 omitted, \fImax\fR is assumed to be positive infinity.
222 .IP "\fB\-m\fR" 4
223 .IX Item "-m"
224 If this option is given, \*(L"Not a Number\*(R" (NaN) is treated as \fIcritical\fR. By
225 default, the \fInone\fR consolidation reports NaNs as \fIwarning\fR. Other
226 consolidations simply ignore NaN values.
227 .SH "RETURN VALUE"
228 .IX Header "RETURN VALUE"
229 As usual for Nagios plugins, this program writes a short, one line status
230 message to \s-1STDOUT\s0 and signals success or failure with it's return value. It
231 exits with a return value of \fB0\fR for \fIsuccess\fR, \fB1\fR for \fIwarning\fR and \fB2\fR
232 for \fIcritical\fR. If the values are not available or some other error occurred,
233 it returns \fB3\fR for \fIunknown\fR.
234 .SH "SEE ALSO"
235 .IX Header "SEE ALSO"
236 \&\fIcollectd\fR\|(1),
237 \&\fIcollectd.conf\fR\|(5),
238 \&\fIcollectd\-unixsock\fR\|(5),
239 <http://nagios.org/>
240 .SH "AUTHOR"
241 .IX Header "AUTHOR"
242 Florian Forster <octo\ at\ collectd.org>