From 34ccf9782285f56b105f11760b74bb130da0653c Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Apr 2014 00:56:12 +0200 Subject: Some snmpfetch tweaks to deal with weird ports. --- clients/snmpfetch.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clients/snmpfetch.pl') diff --git a/clients/snmpfetch.pl b/clients/snmpfetch.pl index 9e089dc..eadf9da 100755 --- a/clients/snmpfetch.pl +++ b/clients/snmpfetch.pl @@ -145,10 +145,10 @@ EOF while (my ($key, $value) = each %$result) { my $port = $key; - my $in = $value->{'ifHCInOctets'} // -1; # Does not exist for some weird stack ports. + my $in = $value->{'ifHCInOctets'} // -1; my $out = $value->{'ifHCOutOctets'} // -1; - my $ine = $value->{'ifInErrors'}; - my $oute = $value->{'ifOutErrors'}; + my $ine = $value->{'ifInErrors'} // -1; + my $oute = $value->{'ifOutErrors'} // -1; my $official_port = exists($ports{$port}) ? 1 : 0; $qpoll->execute($switch->{'switch'}, $port, $in, $out, $ine, $oute, $official_port); } -- cgit v1.2.3