CHECK_LINUX_BONDING(8)
π check_linux_bonding(8) β the Nagios plugin, bestie edition π
okay so real quick β this is check_linux_bonding, section 8 of the manual, and it's a Nagios plugin. yes, that Nagios. the monitoring one. stay with me, it's actually cute.
β¨ NAME β¨
check_linux_bonding β a Nagios plugin for checking the status of bonded network interfaces (masters and slaves) on Linux servers. that's the whole job. she checks bonds. she slays.
π¦ SYNOPSIS π¦
check_linux_bonding [option...]
π DESCRIPTION π
so check_linux_bonding is a plugin for the Nagios monitoring software that checks bonding interfaces on Linux. she's pretty simple, honestly β lowkey minimal, highkey useful. she'll report any interfaces that are down (masters and slaves, both, no favorites). she'll also alert you about bonding interfaces with only one slave, because bestieβ¦ that usually means something got misconfigured. π©
and here's the iconic part: if no bonding interfaces are detected at all, the plugin exits with an OK value (you can change that with the --no-bonding option, more on her later). so it's completely safe to run this on all your Linux machines. like, every single one. go off:
$ ./check_linux_bonding
OK: No bonding interfaces found
first she tries the sysfs (/sys) filesystem to detect bonding interfaces β that's the main character attempt. if that doesn't work (i.e. the kernel or bonding module is too old for the necessary files to even exist π), she falls back to procfs (/proc). and she supports an unlimited number of bonding interfaces. unlimited! no cap. π
in the OK output, she'll show you which of the slaves is active using an exclamation mark ! β if applicable. and if one of the slaves is configured as primary, that gets an asterisk *. iconic notation, honestly:
$ ./check_linux_bonding
Interface bond0 is UP: mode=1 (active-backup), 2 slaves: eth0*, eth1!
πΈ OPTIONS πΈ
-b,--blackliststring | file β blacklist one or more interfaces. you can specify this option multiple times, she doesn't mind. if the argument is a file, the file is expected to contain a single line with the same syntax, i.e.:
interface1,interface2,...
examples, because examples are everything:
check_linux_bonding -b bond1 -b eth1
check_linux_bonding -b bond1,eth1
check_linux_bonding -b /etc/check_linux_bonding.black
-n,--no-bondingstring β lets you pick the return value of the plugin when no bonding interfaces are found. the option expectsok,warning,criticalorunknownas the argument. default isokif the option isn't there.--slave-downstring β lets you pick the return value of the plugin when a slave interface is down. expectsok,warning,criticalorunknown. default iswarningif the option isn't present.-t,--timeoutseconds β the number of seconds after which the plugin will abort. default timeout is5seconds if the option isn't present.-s,--stateβ prefix each alert with its corresponding service state (i.e. warning, critical etc.). super useful when you've got several alerts coming from the same monitored system and you need to tell them apart at a glance. π«Ά-S,--short-stateβ same as--stateabove, except the state is abbreviated to a single letter (W=warning,C=critical etc.). short queen behavior.--ignore-num-adβ only relevant for IEEE 802.3ad type bonding. turning this on tells the plugin to not warn you if the number of AD ports doesn't equal the number of slaves. usually you want the default behavior, but if your 802.3ad bonding device is bound on more than one switch, you'll want this option to dodge those false positives.--linebreakstring βcheck_linux_bondingwill sometimes report more than one line, e.g. if there are several alerts. if the script has a TTY, she uses regular linebreaks. if not (which is the case with NRPE), she uses HTML linebreaks. sometimes it's useful to control exactly what the plugin uses as a line separator, and this option is that control.
the argument is the exact string to be used as the line separator. two exceptions though β two keywords that translate to the following:
REG: regular linebreaks, i.e.\n.HTML: HTML linebreaks, i.e.<br/>.
this is a rather special option that you normally don't need. the default behavior should be enough for most users. genuinely.
--disable-sysfsβ sometimes the info in/sysis partly absent or deficient, and the plugin can't detect that discrepancy, so she reports errors. this usually happens with old Linux kernels and Xen domain-0 systems. this option exists purely as a workaround. if specified, the plugin ignores the/sysfilesystem altogether and uses/procinstead. problem solved, workaround acquired. π-v,--verboseβ verbose output. reports status on all bonding interfaces, regardless of their alert state.-h,--helpβ display help message and exit.-V,--versionβ print version info and exit.
π₯ DIAGNOSTICS π₯
the option -v or --verbose can be specified to display all bonding interfaces. that's the whole section. short and sweet.
π§ DEPENDENCIES π§
this plugin depends on sysfs and fallbacks to procfs. without these filesystems, the plugin will not find any bonding interfaces. at all. zero. none. so keep them around, bestie.
β EXIT STATUS β
if no errors are discovered, a value of 0 (OK) is returned. an exit value of 1 (WARNING) means one or more non-critical errors, while 2 (CRITICAL) means one or more critical errors.
the exit value 3 (UNKNOWN) is reserved for errors within the script itself, or errors getting values from sysfs or procfs. you know, the "it's giving internal chaos" outcomes.
π BUGS AND LIMITATIONS π
none known at present. flawless behavior, allegedly. π
π INCOMPATIBILITIES π
the plugin is only compatible with the Linux operating system. Linux only. that's the vibe check, and other OSes did not pass.
π LICENSE AND COPYRIGHT π
this program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License for more details. (they put those in all caps for a reason, bestie β legally dramatic.) π
you should have received a copy of the GNU General Public License along with this program. if not, see http://www.gnu.org/licenses/.
π SEE ALSO π
http://folk.uio.no/trondham/software/check_linux_bonding.html
π AUTHORS π
Trond Hasle Amundsen <t.h.amundsen@usit.uio.no>
and that's the page, bestie!check_linux_bonding, version05/20/2023, section8of the manual β written by Trond Hasle Amundsen, documented back on05/20/2023, and now lovingly retold for you. go check those bonds. ππ«Άβ¨
π¦ where this page comes from
- epel 9: nagios-plugins-bonding 1.4-15.el9 Β· GPLv3+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms