Code

Imported Upstream version 5.5.0
[pkg-collectd.git] / src / collectd-nagios.1
diff --git a/src/collectd-nagios.1 b/src/collectd-nagios.1
new file mode 100644 (file)
index 0000000..aa5193f
--- /dev/null
@@ -0,0 +1,242 @@
+.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+.    ds C`
+.    ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{
+.    if \nF \{
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
+..
+.        if !\nF==2 \{
+.            nr % 0
+.            nr F 2
+.        \}
+.    \}
+.\}
+.rr rF
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "COLLECTD-NAGIOS 1"
+.TH COLLECTD-NAGIOS 1 "2015-03-10" "5.4.1.805.g42e4d6c" "collectd"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+collectd\-nagios \- Nagios plugin for querying collectd
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+collectd-nagios \fB\-s\fR \fIsocket\fR \fB\-n\fR \fIvalue_spec\fR \fB\-H\fR \fIhostname\fR \fI[options]\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This small program is the glue between collectd and nagios. collectd collects
+various performance statistics which it provides via the \f(CW\*(C`unixsock plugin\*(C'\fR,
+see \fIcollectd\-unixsock\fR\|(5). This program is called by Nagios, connects to the
+\&\s-1UNIX\s0 socket and reads the values from collectd. It then returns \fB\s-1OKAY\s0\fR,
+\&\fB\s-1WARNING\s0\fR or \fB\s-1CRITICAL\s0\fR depending on the values and the ranges provided by
+Nagios.
+.SH "ARGUMENTS AND OPTIONS"
+.IX Header "ARGUMENTS AND OPTIONS"
+The following arguments and options are required and understood by
+collectd-nagios. The order of the arguments generally doesn't matter, as long
+as no argument is passed more than once.
+.IP "\fB\-s\fR \fIsocket\fR" 4
+.IX Item "-s socket"
+Path of the \s-1UNIX\s0 socket opened by collectd's \f(CW\*(C`unixsock plugin\*(C'\fR.
+.IP "\fB\-n\fR \fIvalue_spec\fR" 4
+.IX Item "-n value_spec"
+The value to read from collectd. The argument is in the form
+\&\f(CW\*(C`plugin[\-instance]/type[\-instance]\*(C'\fR.
+.IP "\fB\-H\fR \fIhostname\fR" 4
+.IX Item "-H hostname"
+Hostname to query the values for.
+.IP "\fB\-d\fR \fIdata_source\fR" 4
+.IX Item "-d data_source"
+Each \fIvalue_spec\fR may be made of multiple \*(L"data sources\*(R". With this option you
+can select one or more data sources. To select multiple data sources simply
+specify this option again. If multiple data sources are examined they are
+handled according to the consolidation function given with the \fB\-g\fR option.
+.IP "\fB\-g\fR \fBnone\fR\fI|\fR\fBaverage\fR\fI|\fR\fBsum\fR" 4
+.IX Item "-g none|average|sum"
+When multiple data sources are selected from a value spec, they can be handled
+differently depending on this option. The values of the following meaning:
+.RS 4
+.IP "\fBnone\fR" 4
+.IX Item "none"
+No consolidation if done and the warning and critical regions are applied to
+each value independently.
+.IP "\fBaverage\fR" 4
+.IX Item "average"
+The warning and critical ranges are applied to the average of all values.
+.IP "\fBsum\fR" 4
+.IX Item "sum"
+The warning and critical ranges are applied to the sum of all values.
+.IP "\fBpercentage\fR" 4
+.IX Item "percentage"
+The warning and critical ranges are applied to the ratio (in percent) of the
+first value and the sum of all values. A warning is returned if the first
+value is not defined or if all values sum up to zero.
+.RE
+.RS 4
+.RE
+.IP "\fB\-c\fR \fIrange\fR" 4
+.IX Item "-c range"
+.PD 0
+.IP "\fB\-w\fR \fIrange\fR" 4
+.IX Item "-w range"
+.PD
+Set the critical (\fB\-c\fR) and warning (\fB\-w\fR) ranges. These options mostly
+follow the normal syntax of Nagios plugins. The general format is
+"\fImin\fR\fB:\fR\fImax\fR". If a value is smaller than \fImin\fR or bigger than \fImax\fR, a
+\&\fIwarning\fR or \fIcritical\fR status is returned, otherwise the status is
+\&\fIsuccess\fR.
+.Sp
+The tilde sign (\fB~\fR) can be used to explicitly specify infinity. If \fB~\fR is
+used as a \fImin\fR value, negative infinity is used. In case of \fImax\fR, it is
+interpreted as positive infinity.
+.Sp
+If the first character of the \fIrange\fR is the at\ sign (\fB@\fR), the meaning
+of the range will be inverted. I.\ e. all values \fIwithin\fR the range will
+yield a \fIwarning\fR or \fIcritical\fR status, while all values \fIoutside\fR the range
+will result in a \fIsuccess\fR status.
+.Sp
+\&\fImin\fR (and the colon) may be omitted,
+\&\fImin\fR is then assumed to be zero. If \fImax\fR (but not the trailing colon) is
+omitted, \fImax\fR is assumed to be positive infinity.
+.IP "\fB\-m\fR" 4
+.IX Item "-m"
+If this option is given, \*(L"Not a Number\*(R" (NaN) is treated as \fIcritical\fR. By
+default, the \fInone\fR consolidation reports NaNs as \fIwarning\fR. Other
+consolidations simply ignore NaN values.
+.SH "RETURN VALUE"
+.IX Header "RETURN VALUE"
+As usual for Nagios plugins, this program writes a short, one line status
+message to \s-1STDOUT\s0 and signals success or failure with it's return value. It
+exits with a return value of \fB0\fR for \fIsuccess\fR, \fB1\fR for \fIwarning\fR and \fB2\fR
+for \fIcritical\fR. If the values are not available or some other error occurred,
+it returns \fB3\fR for \fIunknown\fR.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIcollectd\fR\|(1),
+\&\fIcollectd.conf\fR\|(5),
+\&\fIcollectd\-unixsock\fR\|(5),
+<http://nagios.org/>
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Florian Forster <octo\ at\ collectd.org>