aboutsummaryrefslogtreecommitdiffstats
path: root/clients/snmpfetch.pl
diff options
context:
space:
mode:
authorJoachim Tingvold <joachim@tingvold.com>2015-04-01 03:50:56 +0200
committerroot <root@einstein.tg15.gathering.org>2015-04-01 03:50:56 +0200
commitcfa430c07029868bdfd65714fd4974892467b4f4 (patch)
tree99972c5503af560332f053c13326498f7466c0ae /clients/snmpfetch.pl
parentd284e121df845de3118b720e374bf3bcfd1c9317 (diff)
Changes...
Diffstat (limited to 'clients/snmpfetch.pl')
-rwxr-xr-xclients/snmpfetch.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/clients/snmpfetch.pl b/clients/snmpfetch.pl
index 6eb9eb5..ed332a6 100755
--- a/clients/snmpfetch.pl
+++ b/clients/snmpfetch.pl
@@ -147,8 +147,8 @@ sub poll_loop {
push @vars, ["ifInOctets", $port];
push @vars, ["ifOutOctets", $port];
push @vars, ["ifInErrors", $port];
- push @vars, ["ifOutErrors", $port];
push @vars, ["ifDescr", $port];
+ push @vars, ["ifOutErrors", $port];
push @vars, ["ifOperStatus", $port];
my $varlist = SNMP::VarList->new(@vars);
$session->get($varlist, [ \&callback, $switch_status, $port ]);
@@ -219,16 +219,19 @@ sub callback {
if (defined($ine)) {
warn $switch->{'sysname'}.":$port: failed reading in";
}
- $ok = 0;
+ $ok = 0;
}
if (!defined($out) || $out !~ /^\d+$/) {
if (defined($oute)) {
warn $switch->{'sysname'}.":$port: failed reading in";
}
- $ok = 0;
+ $ok = 0;
}
if (!defined($ifdescr)) {
$ok = 0;
+ } elsif ($ifdescr =~ m/\./) {
+ # Skip virtual ports
+ $ok =0;
}
if ($ok) {