Description
- Version of collectd: 5.7.2
- Operating system / distribution: RHEL 7.4
Expected behavior
When restarting collectd (for example, after a configuration change) it is expected that when using write_prometheus as the primary output method the service will be available immediately.
Actual behavior
When restarting collectd, the microhttpd used by write_prometheus will fail to start if the previous daemon was running less than two minutes before. The write_prometheus plugin will log an error, collectd will continue on and not recover on its own.
Steps to reproduce
- step 1
Configure collectd with the write_prometheus plugin. A minimal configuration is fine, and there is no need to actually gather any stats. The default port, 9103, is sufficient.
- step 2
Start collectd. Confirm that the plugin started successfully by viewing the output of "curl http://:9103"
- step 3
Shut down the daemon, and then immediately restart it. No config changes are necessary. Confirm that write_prometheus has failed to start by viewing "curl http://:9103"... you should receive a connection refused error.