.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.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. | will give a
.\" real vertical bar. \*(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-|\(bv\*(Tr
.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" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" 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 "CHECK_LINUX_BONDING 8"
.TH CHECK_LINUX_BONDING 8 "2010-08-23" "check_linux_bonding 1.3.1" "Nagios plugin"
.SH "NAME"
check_linux_bonding \- Nagios plugin for checking the status of bonded
network interfaces (masters and slaves) on Linux servers.
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
check_linux_bonding [\fI\s-1OPTION\s0\fR]...
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
check_linux_bonding is a plugin for the Nagios monitoring software
that checks bonding interfaces on Linux. The plugin is fairly simple
and will report any interfaces that are down (both masters and
slaves). It will also alert you of bonding interfaces with only one
slave, since that usually points to a misconfiguration. If no bonding
interfaces are detected, the plugin will exit with an \s-1OK\s0 value
(modifiable with the \f(CW\*(C`\-\-no\-bonding\*(C'\fR option). It is therefore safe to
run this plugin on all your Linux machines:
.PP
.Vb 2
\& $ ./check_linux_bonding
\& OK: No bonding interfaces found
.Ve
.PP
The plugin will first try to use the sysfs (/sys) filesystem to detect
bonding interfaces. If that does not work, i.e. the kernel or bonding
module is too old for the necessary files to exist, the plugin will
use procfs (/proc) as a fallback. The plugin supports an unlimited
number of bonding interfaces.
.PP
In the \s-1OK\s0 output, the plugin will indicate which of the slaves is
active with an exclamation mark \f(CW\*(C`!\*(C'\fR, if applicable. If one of the
slaves is configured as primary, this is indicated with an asterisk
\&\f(CW\*(C`*\*(C'\fR:
.PP
.Vb 2
\& $ ./check_linux_bonding
\& Interface bond0 is UP: mode=1 (active-backup), 2 slaves: eth0*, eth1!
.Ve
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\-b, \-\-blacklist \fI\s-1STRING\s0\fR or \fI\s-1FILE\s0\fR" 4
.IX Item "-b, --blacklist STRING or FILE"
Blacklist one or more interfaces. The option can be specified multiple
times. If the argument is a file, the file is expected to contain a
single line with the same syntax, i.e.:
.Sp
.Vb 1
\& interface1,interface2,...
.Ve
.Sp
Examples:
.Sp
.Vb 3
\& check_linux_bonding -b bond1 -b eth1
\& check_linux_bonding -b bond1,eth1
\& check_linux_bonding -b /etc/check_linux_bonding.black
.Ve
.IP "\-n, \-\-no\-bonding \fI\s-1STRING\s0\fR" 4
.IX Item "-n, --no-bonding STRING"
This option lets you specify the return value of the plugin if no
bonding interfaces are found. The option expects \f(CW\*(C`ok\*(C'\fR, \f(CW\*(C`warning\*(C'\fR,
\&\f(CW\*(C`critical\*(C'\fR or \f(CW\*(C`unknown\*(C'\fR as the argument. Default is \f(CW\*(C`ok\*(C'\fR if the
option is not present.
.IP "\-\-slave\-down \fI\s-1STRING\s0\fR" 4
.IX Item "--slave-down STRING"
This option lets you specify the return value of the plugin if a slave
interface is down. The option expects \f(CW\*(C`ok\*(C'\fR, \f(CW\*(C`warning\*(C'\fR, \f(CW\*(C`critical\*(C'\fR
or \f(CW\*(C`unknown\*(C'\fR as the argument. Default is \f(CW\*(C`warning\*(C'\fR if the option is
not present.
.IP "\-t, \-\-timeout \fI\s-1SECONDS\s0\fR" 4
.IX Item "-t, --timeout SECONDS"
The number of seconds after which the plugin will abort. Default
timeout is 5 seconds if the option is not present.
.IP "\-s, \-\-state" 4
.IX Item "-s, --state"
Prefix each alert with its corresponding service state (i.e. warning,
critical etc.). This is useful in case of several alerts from the same
monitored system.
.IP "\-S, \-\-short\-state" 4
.IX Item "-S, --short-state"
Same as the \fB\-\-state\fR option above, except that the state is
abbreviated to a single letter (W=warning, C=critical etc.).
.IP "\-\-linebreak=\fI\s-1STRING\s0\fR" 4
.IX Item "--linebreak=STRING"
check_linux_bonding will sometimes report more than one line, e.g. if
there are several alerts. If the script has a \s-1TTY\s0, it will use regular
linebreaks. If not (which is the case with \s-1NRPE\s0) it will use \s-1HTML\s0
linebreaks. Sometimes it can be useful to control what the plugin uses
as a line separator, and this option provides that control.
.Sp
The argument is the exact string to be used as the line
separator. There are two exceptions, i.e. two keywords that translates
to the following:
.RS 4
.IP "\fB\s-1REG\s0\fR" 4
.IX Item "REG"
Regular linebreaks, i.e. \*(L"\en\*(R".
.IP "\fB\s-1HTML\s0\fR" 4
.IX Item "HTML"
\&\s-1HTML\s0 linebreaks, i.e. \*(L"
\*(R".
.RE
.RS 4
.Sp
This is a rather special option that is normally not needed. The
default behaviour should be sufficient for most users.
.RE
.IP "\-\-disable\-sysfs" 4
.IX Item "--disable-sysfs"
Sometimes the information in /sys is partly absent or deficient, and
the plugin is unable to detect this discrepancy and reports
errors. This usually happens with old Linux kernels and Xen domain\-0
systems. This option exists as a workaround. If specified, this option
will make the plugin ignore the /sys filesystem alltogether and use
the /proc filesystem instead.
.IP "\-v, \-\-verbose" 4
.IX Item "-v, --verbose"
Verbose output. Will report status on all bonding interfaces,
regardless of their alert state.
.IP "\-h, \-\-help" 4
.IX Item "-h, --help"
Display help text.
.IP "\-V, \-\-version" 4
.IX Item "-V, --version"
Display version info.
.SH "DIAGNOSTICS"
.IX Header "DIAGNOSTICS"
The option \f(CW\*(C`\-\-verbose\*(C'\fR (or \f(CW\*(C`\-v\*(C'\fR) can be specified to display all
bonding interfaces.
.SH "DEPENDENCIES"
.IX Header "DEPENDENCIES"
This plugin depends on sysfs and fallbacks to procfs. Without these
filesystems the plugin will not find any bonding interfaces.
.SH "EXIT STATUS"
.IX Header "EXIT STATUS"
If no errors are discovered, a value of 0 (\s-1OK\s0) is returned. An exit
value of 1 (\s-1WARNING\s0) signifies one or more non-critical errors, while
2 (\s-1CRITICAL\s0) signifies one or more critical errors.
.Sp
The exit value 3 (\s-1UNKNOWN\s0) is reserved for errors within the script,
or errors getting values sysfs or procfs.
.SH "AUTHOR"
.IX Header "AUTHOR"
Written by Trond H. Amundsen
.SH "BUGS AND LIMITATIONS"
.IX Header "BUGS AND LIMITATIONS"
None known at present.
.SH "INCOMPATIBILITIES"
.IX Header "INCOMPATIBILITIES"
The plugin is only compatible with the Linux operating system.
.SH "REPORTING BUGS"
.IX Header "REPORTING BUGS"
Report bugs to
.SH "LICENSE AND COPYRIGHT"
.IX Header "LICENSE AND COPYRIGHT"
This program is free software: you can redistribute it and/or modify
it under the terms of the \s-1GNU\s0 General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
.Sp
This program is distributed in the hope that it will be useful, but
\&\s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of
\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the \s-1GNU\s0
General Public License for more details.
.Sp
You should have received a copy of the \s-1GNU\s0 General Public License
along with this program. If not, see .
.SH "SEE ALSO"
.IX Header "SEE ALSO"