Possible to add custom tags so I can sort by city/location name?


I’ve been working on this today without success:

I have Telegraf, Influxdb and Grafana on the same VM that is using individual telegraf.conf files in the telegraf.d folder to pull snmp info from different sites. I need to tag these site locations so I can sort in Grafana.

I tried the [global_tags] command in each .conf file and it seems one overwrites the other (screenshot in reddit link).

I use the [[inputs.snmp]] in each .conf is there a way to tag in there?

I did try:

  agents = [ "" ]
  version = 2
  community = "public"
     location="New York"

But telegraf would no longer start.

Any help would be most appreciated.


Yes, of course:


Besides that, you could also use prefix, suffix and override in each input plugin individually:


What is the error message?

I’ve just looked at you links and added the following and the service starts, but the “location” tag doesn’t show in the database if I run

“select * from snmp”

Just realise I used cpu tag which I don’t want, I need something to show the location of the datacenter.

Yes of course, because your syntax is wrong, it should be:

  location = "Victoria"

And I doubt the following line works at all: