influxdbgrafana

In InfluxDB, can I get a list of hosts that have only certain measurements?


We are using InfluxDB 0.10.1 for monitoring, and Grafana 2.6 for showing the results. In the Grafana Templating settings, I have a variable ($host) with this InfluxDB query: SHOW TAG VALUES WITH KEY = "host"

This gives me a list of all the hosts in the database. However, I was wondering, is there a way to add something to that query that will only choose the hosts that have a specific measurement showing up for them? For instance, we have WebSphere Liberty Profile only installed on a subset of the hosts in the database, and I would like only those hosts to show up in the dropdown for the dashboard.


Solution

  • SHOW TAG VALUES does not accept a WHERE clause, so there's no way to further filter the query. See https://github.com/influxdata/influxdb/issues/5245 for a closely related issue.

    It can be done with a SELECT query, but you will have to be more specific as to how the WebSphere information is encoded. Are you saying that you use a different measurement name for each type of host? Or is there an additional tag or field on the WebSphere hosts?