Check_traffic plugin problem
Georgopoulos, Alex (AP - IT)
Alex.Georgopoulos at UAP.com
Tue Aug 12 19:11:15 CEST 2003
It seems that the check_traffic plugin is not parsing the snmpget properly and causing it to report zero across the board
[root at nagios libexec]# ./check_traffic -H <HOSTNAME> -i 13 -b 12500000000 -r GigabitEthernet0/1 -w 95 -c 90
Total RX Bytes: 0.00 MB, Total TX Bytes: 0.00 MB<br>Average Traffic: 0.00 B/s (0.0%) in, 0.00 B/s (0.0%) out
But when i use the snmpget funcion as defined in the perl script I am getting results
[root at nagios libexec]# snmpget -v 1 <HOSTNAME> -c public interfaces.ifTable.ifEntry.ifOutOctets.13
IF-MIB::ifOutOctets.13 = Counter32: 408708037
[root at nagios libexec]# snmpget -v 1 <HOSTNAME> -c public interfaces.ifTable.ifEntry.ifInOctets.13
IF-MIB::ifInOctets.13 = Counter32: 1829853462
Portion of perl script
$_ = `$SNMPGET -v 1 $host_address -c $COMMUNITY interfaces.ifTable.ifEntry.ifInOctets.$iface_number`;
m/(\d*)\s$/;
$in_bytes = $1;
$_ = `$SNMPGET -v 1 $host_address -c $COMMUNITY interfaces.ifTable.ifEntry.ifOutOctets.$iface_number`;
m/(\d*)\s$/;
$out_bytes = $1;
So I am guessing that the regex m/(\d*)\s$/ is wrong but I have never been good at fixing these, so any wiz out there that could help me?
Thanks
Alex Georgopoulos
UAP Server Administrator
Nagios v1.1
check_traffic plugin .90b
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030812/32157aa3/attachment.html>
More information about the Users
mailing list