Flux query help

  • What Grafana version and what operating system are you using?
    9.1 on Oracle Linux 8

I am currently using this query to get a list of hostnames for a variable:
import “influxdata/influxdb/schema”
schema.tagValues(
bucket: “${BUCKET}”,
tag: “host”,
predicate: (r) => true,
start: v.timeRangeStart,
stop:v.timeRangeStop
)

but I get hostnames with 3 dots at the end and when that happens grafana is not displaying the data as I need it.

What would be a better query to get a list of complete hostnames from an influxdb in grafana for variable use?

Hello ,
can be just a visual effect ?
did you try your var in a panel to see it’s correctly passing through ?
you can use query inspector to visualise that

Hi
The problem is not using th evariable in the dasjbpoard, but rather that the data is not retunred when I use the above query. If i use influx query and run the above query, it gives me a list of hosts that do not have the complete host in in the field. Rather the hostname is truncated and left with 3 dots. Here is an example:
I get this:
m-e-cmtuqausexaws208j8-731z3ylanp1r.dom…
m-e-cmtuusexaws208j8-2dc9wcktqsxm.dom…
m-e-cmtuusexaws208j8-3t6618ujp7y4.dom…
m-e-cmtuusexaws208j8-76nxfsr10fbz.dom…

but it should be this:
m-e-cmtuqausexaws208j8-731z3ylanp1r.domain.com
m-e-cmtuusexaws208j8-2dc9wcktqsxm.domain.com
m-e-cmtuusexaws208j8-3t6618ujp7y4.domain.com
m-e-cmtuusexaws208j8-76nxfsr10fbz.domain.com

So I either need a way to make the output column wider to inclde the full fqdn or I need an alternative query.