summaryrefslogtreecommitdiffstats
path: root/check_snmp_switch_traffic.pl
diff options
context:
space:
mode:
Diffstat (limited to 'check_snmp_switch_traffic.pl')
-rwxr-xr-xcheck_snmp_switch_traffic.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/check_snmp_switch_traffic.pl b/check_snmp_switch_traffic.pl
index 2b832be..b38dc58 100755
--- a/check_snmp_switch_traffic.pl
+++ b/check_snmp_switch_traffic.pl
@@ -131,7 +131,9 @@ my $IFACES = get_ifaces($session);
get_info($session, $IFACES);
$session->close();
-print "SNMP OK |";
+my $channel = grep { $IFACES->{$_}{'name'} =~ /^ch/} keys %{ $IFACES };
+my $if = grep { $IFACES->{$_}{'name'} !~ /^ch/} keys %{ $IFACES };
+print "SNMP OK - $if interfaces, $channel port channel |";
foreach my $key (sort {$a <=> $b} keys %{ $IFACES }) {
printf " %s(in)=%sc; %s(out)=%sc;", $IFACES->{$key}{'name'}, $IFACES->{$key}{'in'}, $IFACES->{$key}{'name'}, $IFACES->{$key}{'out'};
}