1CHECK_LINUX_BONDING(8)           Nagios plugin          CHECK_LINUX_BONDING(8)
2
3
4

NAME

6       check_linux_bonding - Nagios plugin for checking the status of bonded
7       network interfaces (masters and slaves) on Linux servers.
8

SYNOPSIS

10       check_linux_bonding [option...]
11

DESCRIPTION

13       check_linux_bonding is a plugin for the Nagios monitoring software that
14       checks bonding interfaces on Linux. The plugin is fairly simple and
15       will report any interfaces that are down (both masters and slaves). It
16       will also alert you of bonding interfaces with only one slave, since
17       that usually points to a misconfiguration. If no bonding interfaces are
18       detected, the plugin will exit with an OK value (modifiable with the
19       --no-bonding option). It is therefore safe to run this plugin on all
20       your Linux machines:
21
22           $ ./check_linux_bonding
23           OK: No bonding interfaces found
24
25
26       The plugin will first try to use the sysfs (/sys) filesystem to detect
27       bonding interfaces. If that does not work, i.e. the kernel or bonding
28       module is too old for the necessary files to exist, the plugin will use
29       procfs (/proc) as a fallback. The plugin supports an unlimited number
30       of bonding interfaces.
31
32       In the OK output, the plugin will indicate which of the slaves is
33       active with an exclamation mark “!”, if applicable. If one of the
34       slaves is configured as primary, this is indicated with an asterisk
35       “*”:
36
37           $ ./check_linux_bonding
38           Interface bond0 is UP: mode=1 (active-backup), 2 slaves: eth0*, eth1!
39
40
41

OPTIONS

43       -b, --blacklist string | file
44           Blacklist one or more interfaces. The option can be specified
45           multiple times. If the argument is a file, the file is expected to
46           contain a single line with the same syntax, i.e.:
47
48               interface1,interface2,...
49
50
51           Examples:
52
53               check_linux_bonding -b bond1 -b eth1
54               check_linux_bonding -b bond1,eth1
55               check_linux_bonding -b /etc/check_linux_bonding.black
56
57
58
59       -n, --no-bonding string
60           This option lets you specify the return value of the plugin if no
61           bonding interfaces are found. The option expects “ok”, “warning”,
62           “critical” or “unknown” as the argument. Default is “ok” if the
63           option is not present.
64
65       --slave-down string
66           This option lets you specify the return value of the plugin if a
67           slave interface is down. The option expects “ok”, “warning”,
68           “critical” or “unknown” as the argument. Default is “warning” if
69           the option is not present.
70
71       -t, --timeout seconds
72           The number of seconds after which the plugin will abort. Default
73           timeout is 5 seconds if the option is not present.
74
75       -s, --state
76           Prefix each alert with its corresponding service state (i.e.
77           warning, critical etc.). This is useful in case of several alerts
78           from the same monitored system.
79
80       -S, --short-state
81           Same as the --state option above, except that the state is
82           abbreviated to a single letter (W=warning, C=critical etc.).
83
84       --ignore-num-ad
85           Only relevant for IEEE 802.3ad type bonding. Turning on this option
86           instructs the plugin to not issue a warning if the number of AD
87           ports are not equal to the number of slaves. Usually you'll want
88           the default behaviour, but if your 802.3ad bonding device is bound
89           on more than one switch, you'll want to use this option to avoid
90           false positives.
91
92       --linebreak string
93           check_linux_bonding will sometimes report more than one line, e.g.
94           if there are several alerts. If the script has a TTY, it will use
95           regular linebreaks. If not (which is the case with NRPE) it will
96           use HTML linebreaks. Sometimes it can be useful to control what the
97           plugin uses as a line separator, and this option provides that
98           control.
99
100           The argument is the exact string to be used as the line separator.
101           There are two exceptions, i.e. two keywords that translates to the
102           following:
103
104           REG: Regular linebreaks, i.e.  “\n”.
105
106           HTML: HTML linebreaks, i.e.  “<br/>”.
107
108           This is a rather special option that is normally not needed. The
109           default behaviour should be sufficient for most users.
110
111       --disable-sysfs
112           Sometimes the information in /sys is partly absent or deficient,
113           and the plugin is unable to detect this discrepancy and reports
114           errors. This usually happens with old Linux kernels and Xen
115           domain-0 systems. This option exists as a workaround. If specified,
116           this option will make the plugin ignore the /sys filesystem
117           alltogether and use the /proc filesystem instead.
118
119       -v, --verbose
120           Verbose output. Will report status on all bonding interfaces,
121           regardless of their alert state.
122
123       -h, --help
124           Display help message and exit.
125
126       -V, --version
127           Print version info and exit.
128

DIAGNOSTICS

130       The option -v or --verbose can be specified to display all bonding
131       interfaces.
132

DEPENDENCIES

134       This plugin depends on sysfs and fallbacks to procfs. Without these
135       filesystems the plugin will not find any bonding interfaces.
136

EXIT STATUS

138       If no errors are discovered, a value of 0 (OK) is returned. An exit
139       value of 1 (WARNING) signifies one or more non-critical errors, while 2
140       (CRITICAL) signifies one or more critical errors.
141
142       The exit value 3 (UNKNOWN) is reserved for errors within the script, or
143       errors getting values sysfs or procfs.
144

BUGS AND LIMITATIONS

146       None known at present.
147

INCOMPATIBILITIES

149       The plugin is only compatible with the Linux operating system.
150
152       This program is free software: you can redistribute it and/or modify it
153       under the terms of the GNU General Public License as published by the
154       Free Software Foundation, either version 3 of the License, or (at your
155       option) any later version.
156
157       This program is distributed in the hope that it will be useful, but
158       WITHOUT ANY WARRANTY; without even the implied warranty of
159       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
160       General Public License for more details.
161
162       You should have received a copy of the GNU General Public License along
163       with this program. If not, see http://www.gnu.org/licenses/.
164

SEE ALSO

166       http://folk.uio.no/trondham/software/check_linux_bonding.html
167

AUTHORS

169       Trond Hasle Amundsen <t.h.amundsen@usit.uio.no>
170
171
172
173check_linux_bonding               07/22/2022            CHECK_LINUX_BONDING(8)
Impressum