How to register the URL for automatic updates?

Hi.
How to add the URL for automatic updates?

my config
[[inputs.ping]]
urls = [“192.168.88.1”, “192.168.88.87”]

how to make a separate file in which there will be a list of hosts and when updating this file, the list is updated in the plugin.

for example

[[inputs.ping]]
urls = [“…/etc/telegraf/icmp.yml”]

in file icmp.yml

  • targets:
    • ‘185.195.152.117’
      labels:
      project: ‘test2’
      env: ‘ip2’

and when adding a new host to icmp.yml, the plugin config was updated automatically without
systemctl restart telegraf

Is there a solution?

You can run telegraf with --watch-config and then just update the config file with the new IPs. Upon change telegraf will reload the config.

See telegraf help for more info.