How to create tag and add multiple host in it

influxdb
telegraf

#1

Hi,

Can someone help me for creating a tag (eg: host) and add multiple hosts with this tags, so that i can execute the query like below:

SELECT mean(total) as total from “mem” WHERE host =~ /$host/ and region =~ /$region/ and pod =~ /$pod/ AND $timeFilter GROUP BY time($interval), “host”, “path” fill(null)

I want to add multiple host in “$host”

Thanks
Ravi


#2

Inside the telegraf.conf file there is a tags section. You need to add these tags in each config file for each host.

Example

[global_tags]
  region = "denver-1"

Supporting Docs

If this in K8 or OSP then it it is slightly different


#3

Thank you very much, it worked.

Thanks
Ravi