Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Multiple Destinations for write_http plugin not working #821
we encounter some problems with multiple (2) destinations for the
This is our custom configuration in
our collectd version (using official Ubuntu trusty Pacakge):
Using only 1 URL block works for both configurations independently. Configuring 2 URLs only sends the metrics to the URL configured last.
we see the following line twice in the syslog after starting collectd.
What is the correct way to specify multiple destinations for the writte_http plugin?
thanks for your help.
@beanieboi, I can confirm this issue. It seems this plugin was forgotten when migrating from the 4.x to the 5.x way of sending data to concurrent destinations.
So your usage of the plugin is correct but I'm afraid there's no real workaround. The good news is that it should be fairly easy to fix.
This allows multiple destinations to work again (fixes collectd#821), using the same logic as other write plugins. The callback name would now be something like: `write_http/http://example.com/endpoint` which is not very nice. The next step would be to change this plugin to use `<Node>` blocks like many others, and pass the URL as a parameter inside each instance block. So I see this patch as the minimum required to let 5.3 and 5.4 users use this plugin with multiple destinations.
@beanieboi yes, if you have a way to test the patch referenced above with your setup, it would be great !
NB: the patch is against collectd-5.3. It applies fine on collectd-5.4.0 though. Use whatever version is more convenient for you, write_http.c is exactly the same in both.
Let me know if you need help building from the source code !