There is another similar request, but it was marked answered without a great solution
I would like to be able to populate the agent’s list via database entry and have telegraf query that. Is this possible? Google has returned nothing for me. That or an existing tool that can iterate through a list of IPs to hit with SNMP and then update the file?
Hi @Dan_Denson,
So looking at the previous blog there seems to be a two-part discussion here. One of the best practices of building an SNMP config with Telegraf. The second is how to generate a config which dynamically contains the snmp endpoint.
For the first question I highly recommend checking out this best practice blog: Telegraf Best Practices: SNMP Plugin | InfluxData
The second question is a bit more difficult and will take some effort on your part. Telegraf is not built to dynamically generate configs that is something you would have to conceive. One of the primary methods developers use is the environment variable feature. This works if the changes so creating a bash script to update the environment variables and restarting telegraf to collect the new env changes. The second option is writing a script to build the telegraf config file.
Hi @Dan_Denson,
You would be surprised a lot of community build their own deployment scripts to fit their individual needs. It’s hard for us to standardise on a way for building configs from other sources. If you would like to contribute code to the idea though that would be awesome.