summaryrefslogtreecommitdiffstats
path: root/web/attachments/304167-check_ifoperstatus_perfdata.diff
blob: 437f47f3300df736f2858b187da1e077d21cfd22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- check_ifoperstatus.pl	2007-03-16 13:11:46.000000000 +0100
+++ check_ifoperstatus_perfdata	2008-12-05 12:53:33.000000000 +0100
@@ -73,6 +73,8 @@
 my $snmpIfLastChange = '1.3.6.1.2.1.2.2.1.9';
 my $snmpIfAlias      = '1.3.6.1.2.1.31.1.1.1.18';
 my $snmpLocIfDescr   = '1.3.6.1.4.1.9.2.2.1.1.28';
+my $snmpIfInOctets   = '1.3.6.1.2.1.2.2.1.10';
+my $snmpIfOutOctets  = '1.3.6.1.2.1.2.2.1.16';
 my $hostname;
 my $ifName;
 my $session;
@@ -127,10 +129,14 @@
 $snmpIfDescr = $snmpIfDescr . "." . $snmpkey;
 $snmpIfName	= $snmpIfName . "." . $snmpkey ;
 $snmpIfAlias = $snmpIfAlias . "." . $snmpkey ; 
+$snmpIfInOctets = $snmpIfInOctets . "." . $snmpkey ; 
+$snmpIfOutOctets = $snmpIfOutOctets . "." . $snmpkey ; 
 
 push(@snmpoids,$snmpIfAdminStatus);
 push(@snmpoids,$snmpIfOperStatus);
 push(@snmpoids,$snmpIfDescr);
+push(@snmpoids,$snmpIfInOctets);
+push(@snmpoids,$snmpIfOutOctets);
 push(@snmpoids,$snmpIfName) if (defined $ifXTable) ;
 push(@snmpoids,$snmpIfAlias) if (defined $ifXTable) ;
 
@@ -219,7 +225,7 @@
 
 
 
-print ("$state: $answer");
+print ("$state: $answer|in=" . $response->{$snmpIfInOctets} . " out=" . $response->{$snmpIfOutOctets});
 exit $ERRORS{$state};