Home Directory

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Directory

BlauwBlaatje

Reviews(1)
byBlauwBlaatje, April 29, 2014
check_linux_bonding
As of Linux 3.13 the bonding driver uses /sys/class/net/bond0/lower_eth0/operstate instead of /sys/class/net/bond0/slave_eth0/operstate. Here is a patch (you might brush it up a bit ;))

--- check_linux_bonding.a 2014-04-30 09:22:10.523457651 +0200
+++ check_linux_bonding.b 2014-04-30 09:26:33.975182901 +0200
@@ -255,6 +255,13 @@
my $masters_file = "$sysdir/bonding_masters";
my @bonds = ();
my %bonding = ();
+ my $device;
+ my ($kernver, @rest) = split('-', `uname -r`);
+ if ( $kernver >= 3.13 ) {
+ $device = "lower";
+ } else {
+ $device = "slave";
+ }

if (! -f $masters_file) {
return {};
@@ -311,8 +318,8 @@

# get slave status
foreach my $slave (@slaves) {
- open my $STATE, '