aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@frank.tg14.gathering.org>2014-04-14 00:56:12 +0200
committerroot <root@frank.tg14.gathering.org>2014-04-14 00:56:12 +0200
commit34ccf9782285f56b105f11760b74bb130da0653c (patch)
treedb5d051262bff89eda346dcfba7ee330c3100225
parent8725a48460c862897e18bd0e2eed4a95a673d207 (diff)
Some snmpfetch tweaks to deal with weird ports.
-rwxr-xr-xclients/snmpfetch.pl6
1 files changed, 3 insertions, 3 deletions
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);
}