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()`