[MediaWiki-commits] [Gerrit] operations/puppet[production]: check_ifstatus: ignore swfab interfaces

2017-09-27 Thread Ayounsi (Code Review)
Ayounsi has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/381132 )

Change subject: check_ifstatus: ignore swfab interfaces
..


check_ifstatus: ignore swfab interfaces

We don't use swfab, but the interfaces are up/down.

From Juniper:
"The fact swfab0 is Up and swfab1 is Down is something merely cosmetic,
the status of the interface follows the primacy of the RG0, when RG0 is
primary on node 0 the swfab0 will show as up and when RG0 is primary on
node 1 the swfab1 will show as up, this will not have any kind of impact
on the device neither on your traffic."

Change-Id: I20e76bbf826e47ec89bcfee76a111a2da3532aa7
---
M modules/nagios_common/files/check_commands/check_ifstatus_nomon
1 file changed, 17 insertions(+), 17 deletions(-)

Approvals:
  jenkins-bot: Verified
  Ayounsi: Looks good to me, approved



diff --git a/modules/nagios_common/files/check_commands/check_ifstatus_nomon 
b/modules/nagios_common/files/check_commands/check_ifstatus_nomon
index f2d8c20..60ad91f 100755
--- a/modules/nagios_common/files/check_commands/check_ifstatus_nomon
+++ b/modules/nagios_common/files/check_commands/check_ifstatus_nomon
@@ -1,7 +1,7 @@
 #! /usr/bin/perl -w
 #
-# check_ifstatus.pl - nagios plugin 
-# 
+# check_ifstatus.pl - nagios plugin
+#
 #
 # Copyright (C) 2000 Christoph Kron
 # Modified 5/2002 to conform to updated Nagios Plugin Guidelines (S. Ghosh)
@@ -26,7 +26,7 @@
 #
 #
 # Report bugs to: c...@zet.net, nagiosplug-h...@lists.sf.net
-# 
+#
 # 11.01.2000 Version 1.0
 #
 # 2014-10-05 - bbl...@wikimedia.org - copied from check_ifstatus,
@@ -103,7 +103,7 @@
 my @unused_ports ;
 my %session_opts;
 
-my @ignoredIfNames = ["vlan"];
+my @ignoredIfNames = ["vlan", "swfab0", "swfab1"];
 
 
 
@@ -126,7 +126,7 @@
 
 alarm($timeout);
 ($session, $error) = Net::SNMP->session(%session_opts);
-   
+
 if (!defined($session)) {
$state='UNKNOWN';
$answer=$error;
@@ -195,7 +195,7 @@
}else{
$ifexclude++;
}
-   
+
}
}else{
$ifunused++;
@@ -268,11 +268,11 @@
printf "   -U (--secname)username for SNMPv3 context\n";
printf "   -c (--context)SNMPv3 context name (default is empty 
string)\n";
printf "   -A (--authpass)   authentication password (cleartext ascii 
or localized key\n";
-   printf " in hex with 0x prefix generated by using 
\"snmpkey\" utility\n"; 
+   printf " in hex with 0x prefix generated by using 
\"snmpkey\" utility\n";
printf " auth password and authEngineID\n";
printf "   -a (--authproto)  Authentication protocol (MD5 or SHA1)\n";
printf "   -X (--privpass)   privacy password (cleartext ascii or 
localized key\n";
-   printf " in hex with 0x prefix generated by using 
\"snmpkey\" utility\n"; 
+   printf " in hex with 0x prefix generated by using 
\"snmpkey\" utility\n";
printf " privacy password and authEngineID\n";
printf "   -P (--privproto)  privacy protocol (DES or AES; default: 
DES)\n";
printf "   -M (--maxmsgsize) Max message size - usefull only for v1 or 
v2c\n";
@@ -280,7 +280,7 @@
printf "   -V (--version)Plugin version\n";
printf "   -h (--help)   usage help \n\n";
print_revision($PROGNAME, '1.4.15');
-   
+
 }
 
 sub process_arguments() {
@@ -304,7 +304,7 @@
"M=i" => \$maxmsgsize, "maxmsgsize=i" => \$maxmsgsize,
"t=i" => \$timeout,"timeout=i" => \$timeout,
);
-   
+
if ($status == 0){
print_help();
exit $ERRORS{'OK'};
@@ -347,12 +347,12 @@
# v3 requires a security username
if (defined $seclevel && defined $secname) {
$session_opts{'-username'} = $secname;
-   
+
# Must define a security level even though defualt is 
noAuthNoPriv
unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv 
authPriv) ) {
usage("Must define a valid security level even 
though default is noAuthNoPriv");
}
-   
+
# Authentication wanted
if ( $seclevel eq 'authNoPriv' || $seclevel eq 
'authPriv' ) {
if (defined $authproto && $authproto ne 'MD5' 
&& $authproto ne 'SHA1') {
@@ -370,7 +370,7 @@
}
}
}
-   
+
# Privacy (DES encryption) wanted
if ($seclevel eq 'authPriv' ) 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: check_ifstatus: ignore swfab interfaces

2017-09-27 Thread Ayounsi (Code Review)
Ayounsi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/381132 )

Change subject: check_ifstatus: ignore swfab interfaces
..

check_ifstatus: ignore swfab interfaces

We don't use swfab, but the interfaces are up/down.

From Juniper:
"The fact swfab0 is Up and swfab1 is Down is something merely cosmetic,
the status of the interface follows the primacy of the RG0, when RG0 is
primary on node 0 the swfab0 will show as up and when RG0 is primary on
node 1 the swfab1 will show as up, this will not have any kind of impact
on the device neither on your traffic."

Change-Id: I20e76bbf826e47ec89bcfee76a111a2da3532aa7
---
M modules/nagios_common/files/check_commands/check_ifstatus_nomon
1 file changed, 17 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/32/381132/1

diff --git a/modules/nagios_common/files/check_commands/check_ifstatus_nomon 
b/modules/nagios_common/files/check_commands/check_ifstatus_nomon
index f2d8c20..c792647 100755
--- a/modules/nagios_common/files/check_commands/check_ifstatus_nomon
+++ b/modules/nagios_common/files/check_commands/check_ifstatus_nomon
@@ -1,7 +1,7 @@
 #! /usr/bin/perl -w
 #
-# check_ifstatus.pl - nagios plugin 
-# 
+# check_ifstatus.pl - nagios plugin
+#
 #
 # Copyright (C) 2000 Christoph Kron
 # Modified 5/2002 to conform to updated Nagios Plugin Guidelines (S. Ghosh)
@@ -26,7 +26,7 @@
 #
 #
 # Report bugs to: c...@zet.net, nagiosplug-h...@lists.sf.net
-# 
+#
 # 11.01.2000 Version 1.0
 #
 # 2014-10-05 - bbl...@wikimedia.org - copied from check_ifstatus,
@@ -103,7 +103,7 @@
 my @unused_ports ;
 my %session_opts;
 
-my @ignoredIfNames = ["vlan"];
+my @ignoredIfNames = ["vlan", "swfab"];
 
 
 
@@ -126,7 +126,7 @@
 
 alarm($timeout);
 ($session, $error) = Net::SNMP->session(%session_opts);
-   
+
 if (!defined($session)) {
$state='UNKNOWN';
$answer=$error;
@@ -195,7 +195,7 @@
}else{
$ifexclude++;
}
-   
+
}
}else{
$ifunused++;
@@ -268,11 +268,11 @@
printf "   -U (--secname)username for SNMPv3 context\n";
printf "   -c (--context)SNMPv3 context name (default is empty 
string)\n";
printf "   -A (--authpass)   authentication password (cleartext ascii 
or localized key\n";
-   printf " in hex with 0x prefix generated by using 
\"snmpkey\" utility\n"; 
+   printf " in hex with 0x prefix generated by using 
\"snmpkey\" utility\n";
printf " auth password and authEngineID\n";
printf "   -a (--authproto)  Authentication protocol (MD5 or SHA1)\n";
printf "   -X (--privpass)   privacy password (cleartext ascii or 
localized key\n";
-   printf " in hex with 0x prefix generated by using 
\"snmpkey\" utility\n"; 
+   printf " in hex with 0x prefix generated by using 
\"snmpkey\" utility\n";
printf " privacy password and authEngineID\n";
printf "   -P (--privproto)  privacy protocol (DES or AES; default: 
DES)\n";
printf "   -M (--maxmsgsize) Max message size - usefull only for v1 or 
v2c\n";
@@ -280,7 +280,7 @@
printf "   -V (--version)Plugin version\n";
printf "   -h (--help)   usage help \n\n";
print_revision($PROGNAME, '1.4.15');
-   
+
 }
 
 sub process_arguments() {
@@ -304,7 +304,7 @@
"M=i" => \$maxmsgsize, "maxmsgsize=i" => \$maxmsgsize,
"t=i" => \$timeout,"timeout=i" => \$timeout,
);
-   
+
if ($status == 0){
print_help();
exit $ERRORS{'OK'};
@@ -347,12 +347,12 @@
# v3 requires a security username
if (defined $seclevel && defined $secname) {
$session_opts{'-username'} = $secname;
-   
+
# Must define a security level even though defualt is 
noAuthNoPriv
unless ( grep /^$seclevel$/, qw(noAuthNoPriv authNoPriv 
authPriv) ) {
usage("Must define a valid security level even 
though default is noAuthNoPriv");
}
-   
+
# Authentication wanted
if ( $seclevel eq 'authNoPriv' || $seclevel eq 
'authPriv' ) {
if (defined $authproto && $authproto ne 'MD5' 
&& $authproto ne 'SHA1') {
@@ -370,7 +370,7 @@
}
}
}
-   
+
# Privacy (DES encryption) wanted
if ($seclevel eq 'authPriv' ) {