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

Hello,

I’ve been working on this today without success:
https://www.reddit.com/r/grafana/comments/m0gfkb/global_tags_in_telegrafconf_screenshots_to_help/

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:

[[inputs.snmp]]
  agents = [ "10.20.30.1:161" ]
  version = 2
  community = "public"
  [inputs.snmp.tags]
     location="New York"

But telegraf would no longer start.

Any help would be most appreciated.

Thanks

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:

[inputs.snmp.tags]
  location = "Victoria"

And I doubt the following line works at all:

[[inputs.snmp.field]]