Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature request: sending to multiple backends #2352
I know you can specify two backend hosts in netdata.conf. Netdata will try the first, and use the second as a backup. It won't send to both.
It would be nice if it could just send the data to both hosts; this would allow for "poor-man's replication" of the metrics. For example, you could run influxdb on two hosts and have netdata send its metrics to both.
If one goes down temporarily, you will have a gap in its data, but at least you'll have data from that time period on the other machine.
In theory, you could copy over the missing data from the other server when the failed machine comes back up.
It seems like it wouldn't be too hard to add the option to just send to all configured backend hosts.
hm... it is a bit more complicated. Each backend is a thread. Then, I am sure people will ask for different settings on each backend (ie one graphite, one opentsdb), etc. So, it will become a project.
There are workarounds though... so you can do both of the solutions you propose with the current netdata.
To push the metrics to 2 backends concurrently, you can do it by having 2 netdata, even on the same machine. The idea is that for the second netdata:
Most of the above settings (all except streaming) can be given on a netdata command line (ie
So, netdata 1 will be sending metrics to netdata 2 and influxdb 1. Then, netdata 2 will be sending metrics to influxdb 2.
Of course, if you have multiple machines, you can send metrics from each machine to influxdb 1 and to a central netdata. Then at the central netdata push all metrics to influxdb 2.
There is also a workaround for handling failures:
They are not automated, but anyway both solutions are just half an hour of work to set them up...
Great workarounds! I was just reading through the backend code, and I can appreciate the complexity of this change.
I like the idea of two netdatas on one machine. I imagine that the one with the small buffer would be pretty lightweight in terms of resource usage, since it's really just acting as a passthrough. Maybe not quite as lightweight as a simple
I also like your idea of using a centralized netdata. Once #2304 is implemented, that would be a good option (otherwise, you'd lose all your host-specific tags when the data moves to the centralized server.
I'll close this issue, since there are practical workarounds. Thanks!
The passthrough netdata will not be collecting any metrics by itself, it yes it would be very light.
You can make it very lightweight in terms of CPU usage, if you are sending metrics to backend
added a commit
Jun 17, 2017
i am the guy.
my requirement is netdata send data to kafka(now use nc to kafka) and influxdb .