We have an influx measurement where we collected perf data on interfaces using telegraf.
the agent created a tag field for “host” and “inteface” on the “net” table. But when selecting the values for (select * from net) there are no columns for host or interface. Therefore, when trying to group by, show in a table the interface/host name, I cannot do so since these values are external to the table. Is there a way to combine both table columns and tag field/values in a query? Any other ideas?
The problem is that when I collect perf data from a linux server using telegraf, the host and interface values are not written in the table values, but only in tag keys.
So I can select * from values where host = ‘hostA’, but I can’t do select hostname, interface where host=‘HostA’ since there are no columns. Am I clear here?
This is my query from within Grafana.
*SELECT derivative(mean(“bytes_recv”), 1s) 8 FROM “net” WHERE (“host” =~ /^$host/ AND “interface” =~ /^$interface$/) AND $timeFilter GROUP BY time($Interval) fill(null)
The values returned from the query are two colums:
timestamp value
Since “interface” or “host” are not columns I cannot return them and/or use them as group by. Unless I misunderstood what you meant.
How can flux help me? And also, can Grafana work with it?