I have a number of network switches in my infrastructure and I have been using telegraf to collect data traffic information from switches with snmp. So far switch IP addresses were added to the config statically. I was wondering if it is possible to call IP list from a database so I don't need to add it every time statically into the config? Or maybe telegraf is just not the tool for that.
Usual config looks like this:
[[inputs.snmp]]
agents = [ "192.168.252.15:161" ]
version = 2
community = "public"
name = "snmp"
[[inputs.snmp.field]]
name = "hostname"
oid = "RFC1213-MIB::sysName.0"
is_tag = true
[[inputs.snmp.table]]
name = "snmp"
inherit_tags = [ "hostname" ]
oid = "IF-MIB::ifXTable"
[[inputs.snmp.table.field]]
name = "ifName"
oid = "IF-MIB::ifName"
is_tag = true