I am using InfluxDB2 and have use case that needs to monitor the number of the active servers(hosts) posting stats to InfluxDB in time series graph. However below query does not give the expected result, could someone please help? Thanks
If you’re using Grafana to visualize you can just set the filter query then use transformations there to get the same info. That’s if you’re using Grafana of course.
Thank you for your reply @RobR. I do use infuxDB query in Grafana. The ideal graph is in time series which x-axis = _time, y-axis = number of the host. With the below query, it returns count only and can not be graphed in time series though. Did I miss something?
Sorry…I missed the time series bit…I thought you wanted the current total count based on the time range used in a stat panel or something. How about this?
Thanks a lot for your help @R0bR. it is very close to what I need. With the updated query you suggested, It can be graphed in table view but not in time series graph. What was the issue then?
You mean in Grafana? You may need to add some transformations to make sure it is trying to graph the correct fields. One I use often is “Organize Fields” then hide the columns I don’t need. This is in Grafana 8.