How to add current hostname as a global tag in InfluxDB's Telegraf?

582 Views Asked by At

Telegraf can be configured to add global tags to all measurements. They can reference environment variables, but I couldn't find if or how they can reference agent defaults, which configures and provides hostname to plugins.

I imagine something like

[global_tags]
  host = ...  # value from [agent].hostname, either configured or the default `os.Hostname()`
0

There are 0 best solutions below