View Full Version : check_graph_traffic.pl correction for % bandwidth usage
Menno
06-19-2006, 04:57 PM
The %-value of bandwidth usage is counted with bytes-in / speed, but in SNMP the speed-OID is in bits not bytes so the outcome is a factor 8 too small.
I can't imagine this hasn't been discovered yet by anyone, maybe it's a recently introduced bug in the newest version of check_graph_traffic.pl, or I missed someone elses post about this..
Anyway I simply changed the following line:
$speed_card = $result->{$OID_SPEED};
-->
$speed_card = $result->{$OID_SPEED} / 8;
Hope this helps someone..
Regards
Menno
ilikecheese
11-13-2006, 05:23 PM
Lol, thanks a lot man!!!!!
I went through periods of caring about this, then not...
But now we are starting to fill our pipe and I need notifications!!!
Thanks again,
Trevor
Menno
11-14-2006, 04:04 PM
You're welcome :)
And if the % bandwidth usage is still incorrect it could be that the physical interface-speed is not the same as the actual maximum speed.
For instance, I have a 100Mbps port connected to a line that is limited to maximally 2048Kbps but Oreon/Nagios thinks it is 100Mbps.
So in Cisco I have the command 'bandwidth 2048' on this interface and then Oreon/Nagios gets the correct bandwidth of 2048Kbps with their SNMP request.
Don't know the command for other kinds of routers.
Regards
Menno van Bennekom
julio
11-14-2006, 07:59 PM
so the plugin is not good in the last oreon version ????
ilikecheese
11-14-2006, 09:19 PM
You're welcome :)
And if the % bandwidth usage is still incorrect it could be that the physical interface-speed is not the same as the actual maximum speed.
For instance, I have a 100Mbps port connected to a line that is limited to maximally 2048Kbps but Oreon/Nagios thinks it is 100Mbps.
So in Cisco I have the command 'bandwidth 2048' on this interface and then Oreon/Nagios gets the correct bandwidth of 2048Kbps with their SNMP request.
Don't know the command for other kinds of routers.
Regards
Menno van Bennekom
That is a very good tip! Good to know that the SNMP request will pull the "bandwidth" value set on the interface. I like!
Menno
11-15-2006, 11:38 AM
so the plugin is not good in the last oreon version ????
AFAIK the current version in the oreon release 1.3.1 has both fixes (4GB limit and bytes-to-bits speed conversion). Don't know it for sure because I'm still using my own version but the source looks good.
The downloadable file 'plugins oreon 1.0' on the other hand does not contain the fixes.
Maybe Ilikecheese used this file, or an older version of oreon, I don't know..
Regards
Menno van Bennekom
julio
11-15-2006, 07:19 PM
ok you can find the last plugins in the laste version of oreon ;)