I am monitoring switch details using prometheus setup and storing that data in influx.
Now here I want to query Temperature, CPU, Memory details at Grafana Dashboard.
field for Temperature - PSU1Temp1
field for memory - memory
field for cpu - systemStats
Hello and welcome @zakir,
Thanks for your question. I’m not that familiar with Grafana and I’m unclear about why you think this is an Influx question? It sounds like a Grafana question. Maybe it’s more appropriate to ask on their community site?
Your queries would look like: SELECT "memory", "memTotalFree", "PSU1Temp1" FROM "telegraf"."autogen"."sno" WHERE time > :dashboardTime:
Or
from(bucket: "telegraf")
|> range(start: -24d)
|> filter(fn: (r) => r._measurement == "snmo" and r._field == "PSU1Temp1" or
r._field == "memTotalFree" or r._field == "memory" )
Depending on whether you’re using influxql (with 1.7) or flux (1.7.6 and greater). I recommend using the UI. It’s probably the easiest way to get started using flux.
Alternatively, you might find this blog helpful.
This is influx query performing at Grafana Dashboard, I change filed memory to memTotalFree
SELECT last(“memTotalFree”) FROM “snmp” WHERE (“agent_host” = ‘100.64.255.3’) AND timeFilter GROUP BY time(__interval) fill(previous)
result = 0%
SELECT mean(“memTotalFree”) FROM “snmp” WHERE (“agent_host” = ‘100.64.255.3’) AND timeFilter GROUP BY time(__interval) fill(null)
result = 2345444%