Hello,
I am currently evaluating/configuring Telegraf 1.26 to collect data from a mid-large server installation, and I’d like to template/refactor the SNMP configuration files.
For example: these option are the same for all agents and all OIDs
[[inputs.snmp]]
## Timeout for each request.
timeout = "1s"
## SNMP version; can be 1, 2, or 3.
version = 2
## SNMP community string.
community = "our-community"
## Number of retries to attempt.
retries = 1
## Probe every 5 minutes
interval = "5m"
Is there a way to configure these option as default for all snmp metrics?
For example in telegraf.conf, while the agents, OIDs, name and conversion would be stored in snmp.conf with a “trimmed” configuration, example below
[[inputs.snmp]]
## Agent addresses to retrieve values from.
agents = ["udp://100.100.100.104"]
[[inputs.snmp.field]]
oid = ".1.3.6.1.4.1.8072.1.3.2.4.1.2.8.116.115.112.45.111.99.115.112.1"
name = "http_status2"
conversion = "int"
without repeating version, community, retries, timeout… for every agent/oid combination.
I have not seen such an option/configuration plugin, so I would assume the configuration files have to be preprocessed, but I thought I’d ask
Thanks a lot and best regards
Ivan