Sending log to multiple Logstash with GELF

Hi,

Is it possible to set multiple logstash ip addresses for gelf-address?

In this way even if one logstash node is down another one can handle logs.

Thanks

I found an article related my issue.

Logstash instances are independent from each other. You can use HAproxy, some kind of DNS-based distribution, or native round-robin support (where available;
e.g. logstash-forwarder randomly picks one of the IP addresses for A records that resolve to multiple addresses) to distribute the requests.
https://discuss.elastic.co/t/logstash-output-for-multiple-elasticsearch-instance/2194

In my case, there are two logstash containers that exist separated nodes(Docker Hosts).

It does not work.

/etc/haproxy/haproxy.cfg

listen graylog :12203
  mode tcp # udp does not work?
  option tcplog
  balance roundrobin
  server graylog1 127.0.0.1:12201 check # for logstash on a local Docker Host
  server graylog2 10.0.2.15:12201 check # for logstash on a remote Docker Host

https://siawyoung.com/coding/sysadmin/graylog2/load-balancing-graylog-2-with-haproxy.html#change-haproxys-health-check-to-graylog2s-rest-api

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.