Trying to find examples of multiple telegraf.conf files and not finding what I need.
I have 6 devices on my network from which I wish to collect SNMP data. It’s all going into one influx database. I have 4 working well but the last 2 are causing issues so I want to split them all up for ease of problem-solving.
What I want to do is put the output section in the telegraf.cong file and each separate snmp device in its own .conf file in telegraf.d directory.
1/ Will this work!
2/ I can see all the other .conf files go in telegraf.d But, do I need to specify the names of the.conf files in the original telegraf.conf file!
Hi @NVass ,
1/ that should work
2/ you don’t have to specify the names in the original telegraf.conf file ,
all files *.conf in telegraf.d will be loaded
I’ve provided an example of such configuration. Please let me know if this explains what you need:
Pretty sure I can make this work with your comments and Examples.
Have a good Easter Weekend.
May I change configuration on the fly? or do I have to restart to be able to change configuration.
I need to add or remove devices to Telegraf for collecting data. New network element can be added or one of them can be removed from network. So I need to update Telegraf and I don’t want to restart each time.
You can send a SIGHUP to Telegraf to have it reread the configuration. However currently this behaves very similarly to restarting Telegraf, all plugins are recreated so it is still possible miss an interval.
Thank you very much for your response. What about if I use a separate Telegraf for each device. Is that make sense?
Do you mean, for example, running 5 Telegraf on one system to monitor 5 network devices? You could signal each one independently then, and it ought to all work, but it seems like a headache to manage and would probably use a lot more system resources. I usually try to stick to one Telegraf per system, but I know some very large SNMP deploys, with thousands of devices, need to use multiple Telegraf.