5
我使用telegraf將snmp數據推入我的InfluxDB並通過Grafana對其進行可視化。InfluxDB中多處不返回結果
現在我遇到了一個奇怪的問題考慮下面的系列(最有可能只是一個在我身邊missunderstanding ...)
:
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
我目前使用的grafana下面的查詢來獲取數據(工作正常):
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
我現在只需要選擇一個單一的接口的數據(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
但是這不會返回任何結果,雖然應該有很多。
我真的很感激任何暗示什麼問題是...
乾杯