Create InfluxDB v2 graph for increasing counter value

Viewed 16
  • I am using the SNMP plugin for the Telegraf agent, to gather a counter value, such as udpInDatagrams.
  • The data points are being written to InfluxDB v2, running in a Linux container, using Docker.
  • The counter value always increases, but never decreases.

Right now, my graph shows the counter value increasing, but never decreasing. My objective is to see the value of the counter per-period, rather than an absolute / lifetime value.

In other words, each value on the graph should be:

current_value - last_value

enter image description here

Question: How do I create an InfluxDB v2 graph that shows the value of the counter per-period (ie. 10 seconds, 1 minute, 5 minutes), instead of constantly increasing in value?

1 Answers

With Flux there is the derivative() function and with InfluxQL, there is the NON_NEGATIVE_DERIVATIVE() function, which is in this case preferred over the DERIVATIVE() function as the snmp counter can also overflow (reset).

Related