Icinga2 Store Traffic Values


whats the value to store traffic?
currently most of my plugins return value since reboot but graphite does not show this correctly.
should i store last value and subtract them from current in plugin check or is there a solution to tell graphite to do this?


I cannot follow here. Which plugins are you using and how does their graph look like in Graphite?
What’s the current value and which value do you expect?


make sense to get traffic since last check and not since last reboot.

i read via snmp the traffic from switches and routers via oid. most (or all) devices return int of bytes since reboot. and i want to ask should i create an plugin which stores value local and subtract current value from local stored value.


Is that an important measurement for switches and routes, as in “all time traffic”? To my knowledge, such counters would overflow at some point (32 bit counters) and you then also start with -1/0. Also, numbers will overflow in metric backends as well. The bandwidth as a rate is much more interesting as sample over time.

Here’s an interesting read on the topic:

Many of the variables accessible through SNMP are counters . Counters in SNMP are never reset, and they don’t have a defined starting value. So they can really only be used to measure rates: From two consecutive measurements of a counter, you can compute a rate by dividing the difference between the readings through the time interval between them. A common example are the per-interface “octet” (byte) counters for input and output traffic ( ifInOctets and ifOutOctets ), that have been in SNMP since the very beginning and that are used for monitoring traffic rates.

Likely you can build such measurement samples with then detecting the gap and continue counting. I’ve seen patches in check_snmp_int.pl for this AFAIK.

Before going the route of creating such a plugin, I’d still recommend to find out why you need that (likely your boss told you so).


i am looking to getting graphs like this.
So when i understand you right, best is to:

dividing the difference between the readings

then i can look for existing plugins which already do this or change code of our existing perl scripts.