aboutsummaryrefslogtreecommitdiffstats
path: root/clients/snmpfetch.pl
diff options
context:
space:
mode:
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) {