Hi community,
Basically I am trying to using InfluxDB Cloud & Telegraf to get the OID of network devices in order to display the Traffic IN / OUT.
However, when I try to run the following query, I am not getting all the values:
from(bucket: "SNMP")
|> range(start: -60m)
|> filter(fn: (r) => r._measurement == "snmp")
|> filter(fn: (r) =>
(r.agent_host == "xxx.xxx.xxx.xxx" and (r._field == "Dummy1" or r._field == "Dummy2"))
)
|> derivative(unit: 1s, nonNegative: true)
|> aggregateWindow(every: 5m, fn: mean, createEmpty: false)
|> map(fn: (r) => ({ r with _value: r._value * 8.0 / 1024.0 }))
If i turn the nonNegative to false the values get display, but I guess that in Traffic IN / OUT it does not make sense negative values. This is the output that I am getting with the nonNegative to false :
Btw, this only happens on some network devices, and the negative values only happen sometimes, it’s not 100% of the time.
Thanks in advance for the attention!

