I am trying to send the same logs from Filebeat to two different servers (one Logstash and one Graylog server) without load balancing. We are testing ELK and Graylog at our company and for testing purposes, we'd like to send the logs to two different stacks. However, on the filebeat.yml file, I only see an option to give a list of logstash servers if one wants to load balance. Otherwise the default is false so all the logs will only go to one server chosen at random. This is what I have in the yml file:
### Logstash as output
logstash:
# The Logstash hosts
hosts: ["logstash-host:5044"]
# Number of workers per Logstash host.
#worker: 1
# Set gzip compression level.
#compression_level: 3
# Optional load balance the events between the Logstash hosts
#loadbalance: true
If I change it to:
### Logstash as output
logstash:
# The Logstash hosts
hosts: ["logstash-host:5044", "graylog-host:5044"]
# Number of workers per Logstash host.
#worker: 1
# Set gzip compression level.
#compression_level: 3
# Optional load balance the events between the Logstash hosts
#loadbalance: true
I will only get the logs sent to one of these.
And if I set loadbalance: true, the logs get distributed to two of the servers. Is there a way to send all logs to both the servers?
Much appreciated.