I have set up two interfaces as bonding slaves (eth0 and eth1 bonded as bond0). How are people monitoring the status of the slaves?
How are you notified if the link fails on one interface? Do you poll something in /sys/class/net/bond0 or /proc/net/bonding/bond0 ? Is there a daemon I can configure to get notifications?
Some context: I'm running SUSE 11 server SP1 and I'm not interested in any graphical tool as this server is not running X11.
There are some ways to do this:
As you mentioned, query status from
/proc/net/bonding/bond0
:Nagios's check_linux_bonding plugin.
SNMP.
If you are doing bonding, check /proc/net/bonding/bond0.
You should see something like this
I just check to see if the Currently Active slave has changed or not.
Also if you are just looking to see if link is lost on one of your NIC's, you can still do that though SNMP or other standard forms of monitoring.
Under Nagios I used
check_ifoperstatus
on each of the slave interfaces which performs an SNMP query to 1.3.6.1.2.1.2.2.1.8 in the IF-MIB.I haven't any Suse here to test the command. In fedora/redhat I use "ethtool slave_device_name" http://en.wikipedia.org/wiki/Ethtool and i see "Link detected:" parameter.