check_linux_bonding

Bookmark and Share

Current Version
1.3.1
Last Release Date
2010-10-26
Compatible With
  • Nagios 2.x
  • Nagios 3.x
E-mail
License
GPL
Hits
34351
check_linux_bonding
check_linux_bonding is a plugin for Nagios that checks bonded network 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 OK value by default. It is therefore safe to run this plugin on all your Linux machines.

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.

check_linux_bonding is designed to be used with NRPE, i.e. run locally. Example:

$ ./check_linux_bonding
Bonding interface bond0 [mode=4 (802.3ad)]: Slave eth2 is down

In the OK output, the plugin will indicate which of the slaves is active with an exclamation mark "!", if applicable. If one of the slaves is configured as primary, this is indicated with an asterisk "*":

$ ./check_linux_bonding
Interface bond0 is up: mode=1 (active-backup), 2 slaves: eth0*!, eth1
Reviews (1)
byaBill, February 23, 2012
2 of 2 people found this review helpful
This is a great piece of work. Thank you for making it available.