summaryrefslogtreecommitdiffstats
path: root/web/attachments/43217-check_ifstatus-snmplocifdescr.patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/43217-check_ifstatus-snmplocifdescr.patch')
-rw-r--r--web/attachments/43217-check_ifstatus-snmplocifdescr.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/web/attachments/43217-check_ifstatus-snmplocifdescr.patch b/web/attachments/43217-check_ifstatus-snmplocifdescr.patch
new file mode 100644
index 0000000..7fdd656
--- /dev/null
+++ b/web/attachments/43217-check_ifstatus-snmplocifdescr.patch
@@ -0,0 +1,41 @@
1--- check_ifstatus.orig Sat Feb 22 18:18:00 2003
2+++ check_ifstatus Sun Feb 23 11:23:53 2003
3@@ -160,6 +160,9 @@
4 push(@snmpoids,$snmpIfType);
5 push(@snmpoids,$snmpIfName) if ( defined $ifXTable);
6
7+if (defined($response = $session->get_table($snmpLocIfDescr))) {
8+push(@snmpoids,$snmpLocIfDescr);
9+}
10
11
12 foreach $snmpoid (@snmpoids) {
13@@ -191,10 +194,17 @@
14 if ($ifStatus{$key}{$snmpIfOperStatus} == 1 ) { $ifup++ ;}
15 if ($ifStatus{$key}{$snmpIfOperStatus} == 2 ) {
16 $ifdown++ ;
17- $ifmessage .= sprintf("%s: down -> %s<BR>",
18+ if (defined($ifStatus{$key}{$snmpLocIfDescr})) {
19+ $ifmessage .= sprintf("%s: down -> %s, ",
20+ $ifStatus{$key}{$snmpIfDescr},
21+ $ifStatus{$key}{$snmpLocIfDescr});
22+ }
23+ if (!defined($ifStatus{$key}{$snmpLocIfDescr})) {
24+ $ifmessage .= sprintf("%s: down -> %s, ",
25 $ifStatus{$key}{$snmpIfDescr},
26- $ifStatus{$key}{$snmpIfName});
27+ $ifStatus{$key}{$snmpIfDescr});
28 }
29+ }
30 if ($ifStatus{$key}{$snmpIfOperStatus} == 5 ) { $ifdormant++ ;}
31 }
32 }
33@@ -203,7 +213,7 @@
34
35 if ($ifdown > 0) {
36 $state = 'CRITICAL';
37- $answer = sprintf("host '%s', interfaces up: %d, down: %d, dormant: %d<BR>",
38+ $answer = sprintf("host '%s', interfaces up: %d, down: %d, dormant: %d, ",
39 $hostname,
40 $ifup,
41 $ifdown,