Hello community,
here is the log from the commit of package monitoring-plugins-bonding for
openSUSE:Factory checked in at 2018-07-19 22:56:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/monitoring-plugins-bonding (Old)
and /work/SRC/openSUSE:Factory/.monitoring-plugins-bonding.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "monitoring-plugins-bonding"
Thu Jul 19 22:56:51 2018 rev:5 rq:624050 version:0.002
Changes:
--------
---
/work/SRC/openSUSE:Factory/monitoring-plugins-bonding/monitoring-plugins-bonding.changes
2017-04-29 10:54:18.225621170 +0200
+++
/work/SRC/openSUSE:Factory/.monitoring-plugins-bonding.new/monitoring-plugins-bonding.changes
2018-07-19 23:01:56.856656595 +0200
@@ -1,0 +2,5 @@
+Thu Jul 12 13:04:59 CEST 2018 - [email protected]
+
+- do also check for churned state on lacp interfaces and warn
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ monitoring-plugins-bonding.spec ++++++
--- /var/tmp/diff_new_pack.2ThBGD/_old 2018-07-19 23:01:57.284655257 +0200
+++ /var/tmp/diff_new_pack.2ThBGD/_new 2018-07-19 23:01:57.288655244 +0200
@@ -1,7 +1,7 @@
#
# spec file for package monitoring-plugins-bonding
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
Version: 0.002
Release: 0
Summary: Nagios Network Bonding Check
-License: GPL-2.0+ or Artistic-1.0
+License: GPL-2.0-or-later OR Artistic-1.0
Group: System/Monitoring
Url:
http://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/Linux/Network-Bonding
Source0: check_bonding.pl
++++++ check_bonding.pl ++++++
--- /var/tmp/diff_new_pack.2ThBGD/_old 2018-07-19 23:01:57.328655119 +0200
+++ /var/tmp/diff_new_pack.2ThBGD/_new 2018-07-19 23:01:57.328655119 +0200
@@ -52,6 +52,8 @@
while (($_ = <F>||"") !~ /^$/) {
$data->{'slaves'}->{$slave}->{'mii'} = $1 if
/^MII Status: (.+)$/;
$data->{'slaves'}->{$slave}->{'failure-count'}
= $1 if /^Link Failure Count: (.+)$/;
+ $data->{'slaves'}->{$slave}->{'actor-churn'} =
$1 if /^Actor Churn State: (.+)$/;
+ $data->{'slaves'}->{$slave}->{'partner-churn'}
= $1 if /^Partner Churn State: (.+)$/;
}
}
}
@@ -67,17 +69,31 @@
return (0, "Unable to read bond information") unless $data;
my $error = 0;
my $config_str;
+ my $status = $data->{'status'};
+ if (defined $data->{'slaves'}) {
+ foreach (keys %{$data->{'slaves'}}) {
+ $status = "warn" if
$data->{'slaves'}->{$_}->{'actor-churn'}
+ &&
$data->{'slaves'}->{$_}->{'actor-churn'} eq "churned";
+ $status = "warn" if
$data->{'slaves'}->{$_}->{'partner-churn'}
+ &&
$data->{'slaves'}->{$_}->{'partner-churn'} eq "churned";
+ }
+ }
if (defined $data->{'active'}) {
$config_str = sprintf "$interface_name %s on %s: members =",
$data->{'status'}, $data->{'active'} ;
} elsif (defined $data->{'slaves'}) {
- $config_str = sprintf "$interface_name %s: members =",
$data->{'status'};
+ $config_str = sprintf "$interface_name %s: members =", $status;
} else {
$config_str = sprintf "$interface_name %s has no physical
devices", $data->{'status'};
$error = 1;
}
foreach (keys %{$data->{'slaves'}}) {
- $config_str.= " $_ (" . $data->{'slaves'}->{$_}->{'mii'} . ")";
+ my $result = $data->{'slaves'}->{$_}->{'mii'};
+ $result = "churned" unless
$data->{'slaves'}->{$_}->{'actor-churn'} eq 'none';
+ $result = "churned" unless
$data->{'slaves'}->{$_}->{'partner-churn'} eq 'none';
+ $config_str.= " $_ (" . $result . ")";
$error = 1 unless $data->{'slaves'}->{$_}->{'mii'} eq 'up';
+ $error = 1 unless $data->{'slaves'}->{$_}->{'actor-churn'} eq
'none';
+ $error = 1 unless $data->{'slaves'}->{$_}->{'partner-churn'} eq
'none';
$error = 2 if ($data->{'status'} ne 'up');
}
return $error, $config_str;