Hi,
I want to scrap different host from a single telegraf,
1 linux server (hosting telegraf) and 2 snmp (each one with a different hostname) how can i do this ?
Thanks
Mike
Should be doable. Docs are here
If there’s issues with identifying what came from where, telegraf has a number of post processor plugins , such as override and rename.
all the data will be collected from the linux server with telegraf.
So i want to do
hostname=“linuxserver”
[input.cpu]
hostname=“switch1”
[input.snmp]
etc
This should actually be possible, here is a config snippet as a suggestion:
[agent]
# other agent configs
omit_hostname = true # "host" tag not set in the telegraf agent
[[inputs.cpu]]
# inputs.cpu config here
[inputs.cpu.tags]
hostname = "linuxserver"
[[inputs.snmp]]
# inputs.snmp config here
[inputs.snmp.tags]
hostname = "switch1"
[[inputs.snmp]]
# inputs.snmp config here
[inputs.snmp.tags]
hostname = "switch2"
You could also use the name_override
config parameter in your input plugins.