How can I add thousands of SNMP agent to telegraf

Hello,
I am wondering how to add multiple agent to telegraf easily. We’re adding like one router per day, and my team and I don’t wanna go to the config file to add a router to telegraf.

I’ve been thinking of using an environment variable, but there is a size limit.
Or creating a php website to add or delete an ip adress.
Or a bash script
It has to be userfriendly a bit

To add more context, I am a student and i have the project of replace my company monitoring solutions with grafana and telegraf.

Is there a way to add snmp agent throught grafana ?

Any idea ?
Does an agent manager exist ?

############################
#Edgrouter Inputs ##########
##
## EdgeRouter devices
##
 [[inputs.snmp]]
   # List of agents to poll
   agents = [
  "pubIP",
  "pubIP",] + ~ thousands of routers to add

I assume that with that number of devices, and that rate of changes, you are
using some type of Configuration Management System to set up and manage the
devices in the first place, so that’s where I would start with looking for a
way to get it to update telegraf at the same time, instead of creating another
tool to do (part of) the same job.

Antony.

1 Like

Thank you for your reply !
To add more context, I am a student and i have the project of replace my company monitoring solutions with grafana and telegraf.
We don’t have any configuration management system, we do it by hand but I think its a good idea. I’ll try to do it.

1 Like

I’m doing that with Ansible playbooks.

But I would suggest to use a separate [[inputs.snmp]] config for each router, as if one has connectivity issues, it would otherwise impact all the others… Also that way each can have its own community string as well…