I'm using telegraf to push snmp data into my InfluxDB and visualize it through Grafana.
Now I ran into a weird problem (most likely just a missunderstanding on my side...)
Given the following series:
snmp,agent_host=10.20.30.40,host=grafana-dev,hostname=1OG,ifIndex=3,ifName=ath0
snmp,agent_host=10.20.30.40,host=grafana-dev,hostname=1OG,ifIndex=3,ifName=ath1
I currently use the following query in grafana to get the data (which works fine):
SELECT
non_negative_derivative(mean("ifInOctets"), 1s) *8 AS "In",
non_negative_derivative(mean("ifOutOctets"), 1s) *8 AS "Out"
FROM "snmp"
WHERE "host" = 'grafana-dev'
AND "hostname" =~ /^1OG$/
AND time > now() - 6h
GROUP BY time(10s), "hostname", "ifName" fill(null)&epoch=ms
I now need to only select the data for a single interface (ifName):
SELECT
non_negative_derivative(mean("ifInOctets"), 1s) *8 AS "In",
non_negative_derivative(mean("ifOutOctets"), 1s) *8 AS "Out"
FROM "snmp"
WHERE "host" = 'grafana-dev'
AND "hostname" =~ /^1OG$/
AND "ifName"= 'ath0'
AND time > now() - 6h
GROUP BY time(10s), "hostname", "ifName" fill(null)&epoch=ms
But this does not return any results although there should be plenty.
I'd really appreciate any hint what the issue is...
Cheers
Note to myself: always double check the available series.
The series posted above are old series where no new data is added by telegraf and therefor no results are returned. The correct (current) series are named:
snmp,agent_host=10.20.0.11,host=grafana-dev,hostname=1OG,ifDescr=ath0,ifIndex=6
snmp,agent_host=10.20.0.11,host=grafana-dev,hostname=1OG,ifDescr=ath1,ifIndex=5
and work fine. Sorry for bothering :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With