Can we have multiple output.logstash in filebeat.yml

Hi,

I have a logging system, where I have configured filebeat with one output.logstash:, now I want to add another logstash. Is it possible to do that ?
Something like:

output.logstash:
hosts: ["10.0.2.4:5051"]
hosts: ["11.0.2.4:5051"]

Thanks for your advice.

Yes, it's possible. output.logstash.hosts is a list. You can add multiple items to it:

output.logstash:
  hosts: ["10.0.2.4:5051", "11.0.2.4:5051"]

@kvch, thanks for your reply, but what I know the way you are mentioning is load balancing.
Please correct me if I am wrong. But what I want is 2 difference independent logstash ouputs.

I see. Sorry for misunderstanding your use case. This is unfortunately not supported yet. But you can work around it by starting two Filebeat instances with the same config except for the output.logstash.hosts part.

No problem at all, thanks for your advice. I would follow your advice, let you know whether it worked.
Thanks a lot slight_smile:

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