Faidon Liambotis has submitted this change and it was merged.
Change subject: nagios: remove broken WHOIS support from check_bgp
......................................................................
nagios: remove broken WHOIS support from check_bgp
It's broken anyway and results in warnings, so strip it from the code.
Change-Id: I7dc8f07c1effdf126ee475464a1fb001ecadbf6a
---
M modules/nagios_common/files/check_commands/check_bgp
1 file changed, 3 insertions(+), 22 deletions(-)
Approvals:
Faidon Liambotis: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/nagios_common/files/check_commands/check_bgp
b/modules/nagios_common/files/check_commands/check_bgp
index 1c56a8a..c6d948c 100755
--- a/modules/nagios_common/files/check_commands/check_bgp
+++ b/modules/nagios_common/files/check_commands/check_bgp
@@ -7,7 +7,8 @@
# disabled EPN, changed UNKNOWN error value to 3,
# and fixed an undef var in an error string concat...
# This script still sucks, but this makes it barely work
-# faidon - 2016-03-28 - set %uplinks to WMF's transits
+# faidon - 2016-03-28 - set %uplinks to WMF's transits; removed
+# whois support
#
# check_bgpstate.pl - nagios plugin
#
@@ -41,8 +42,6 @@
&Getopt::Long::config('auto_abbrev');
-# whois programm for RIPE database queries
-my $whois = '/usr/bin/whois';
my $status;
my $TIMEOUT = 30;
@@ -93,7 +92,6 @@
my $bgpdown =0;
my $bgpidle =0;
my $bgpmessage;
-my $asname;
my $remoteas;
my @output;
@@ -180,25 +178,8 @@
if (exists($uplinks{$bgpStatus{$key}{$snmpbgpPeerRemoteAs}}) ) {
$bgpcritical++;
}
- @output = `$whois -T aut-num AS$bgpStatus{$key}{$snmpbgpPeerRemoteAs}`;
-
- $asname = "";
- foreach (@output) {
- if (m/as-name/) {
- $asname = $_;
- $asname =~ s/as-name://;
- last;
- }
- if ( $asname =~ "" && m/descr/ ) {
- $asname = $_;
- $asname =~ s/descr://;
- }
- }
- $asname =~ s/^\s*//;
- $asname =~ s/\s*$//;
$bgpmessage .= sprintf("Peering with AS%s not established -> %s<BR>",
- $bgpStatus{$key}{$snmpbgpPeerRemoteAs},
- $asname);
+ $bgpStatus{$key}{$snmpbgpPeerRemoteAs});
}
}
--
To view, visit https://gerrit.wikimedia.org/r/279958
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7dc8f07c1effdf126ee475464a1fb001ecadbf6a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits