Calculating rate and check_snmp
Posted: Fri Oct 29, 2010 12:38 pm
Hello all,
I'm using check_snmp to poll some network devices for in_octets and out_octets to see how much traffic is flowing over some interfaces. I have it polling with the default 5min interval and I set the check_snmp arguments to use the "-rate" option to calculate the difference between the current value and the previous value, as the counter on the switch gives total octets on the interface, not rate per second or anything.
This seems to work fine.
What I'd like to know is, how does the "-rate" argument calculate? For example, does it somehow check and see that my service monitor is configured to poll at a 5min interval and include the polling interval in its math (maybe using the mod date on the previous temp file)? Or is it simply returning the octet count since the last check, and therefore I'd need to do additional math to take the polling interval into account (in this case, 5min * 60sec = 300sec, so divide the returned value by 300 to calculate the octets/sec value)?
Thanks for your help,
Jeff
I'm using check_snmp to poll some network devices for in_octets and out_octets to see how much traffic is flowing over some interfaces. I have it polling with the default 5min interval and I set the check_snmp arguments to use the "-rate" option to calculate the difference between the current value and the previous value, as the counter on the switch gives total octets on the interface, not rate per second or anything.
This seems to work fine.
What I'd like to know is, how does the "-rate" argument calculate? For example, does it somehow check and see that my service monitor is configured to poll at a 5min interval and include the polling interval in its math (maybe using the mod date on the previous temp file)? Or is it simply returning the octet count since the last check, and therefore I'd need to do additional math to take the polling interval into account (in this case, 5min * 60sec = 300sec, so divide the returned value by 300 to calculate the octets/sec value)?
Thanks for your help,
Jeff