Can we both enable outputs for Elasticsearch and Logstash?

I want to my Logs to output both Elasticsearch and Logstash , can I config like the below?

#================================ Outputs =====================================

Configure what outputs to use when sending the data collected by the beat.

Multiple outputs may be used.

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:

Array of hosts to connect to.

hosts: ["localhost:9200"]

#----------------------------- Logstash output --------------------------------
output.logstash:

The Logstash hosts

hosts: ["localhost:5044"]

In Beats 6.x the support for multiple outputs at the same time was removed. So the above works in 5.x but not 6.x.

So any workaround exists in beats 6.x? such as run two beat instances in the same server?

Yes, you can run two or more Beats instances. The only thing you need to be careful is to make sure they use a different data directory especially in the case of Filebeat.

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