1

I've setting up a server which collects statistics of different other servers. I'm using the network plugin of collectd, so I configured the plugin network by setting up a listener.

In my network, I can use the private IP for "Server" in the configuration. Everything works. One of these servers is a remote server and can only be reached through the internet. So the server is configured to send the data to an DNS-address (see config snippet). After starting the service of collectd on this server it works perfect. If I get a new dynamic IP-address for my connection, the remote server doesn't send data to collectd. Only if I restart collectd on the remote server, it works until the IP-address will be changed again.

In my opinion the plugin resolves the DNS-address only once at startup. Is there any option to solve my problem without restarting the collectd service?

config:

<Plugin network>
#       # client setup:
        Server "name.of.server" "25826"
</Plugin>
masegaloeh
  • 18,236
  • 10
  • 57
  • 106

1 Answers1

1

Is there any option to solve my problem without restarting the collectd service?

This question had been asked also seven years ago. But still no workaround for this limitation except restarting collectd.

See also similiar github issue: Network plugin not automatically reconnecting with dynamic IP address

The network plugin is using UDP, so there's no real "connection" taking place. Fixing this would mean doing a DNS lookup for each batch of values sent over the network, which would be a compromise over performance.

I guess this is a problem you're also seeing with other "client-server" systems sharing this setup ? Aren't you able to notify collectd of the server IP address change ? Or cron a reload of collectd at the time the DHCP lease expires ? Or use the AMQP plugin to ship the values to the server without risking any loss ? I'm sure we can imagine other solutions for what really looks more like a network setup problem.

masegaloeh
  • 18,236
  • 10
  • 57
  • 106