# Can we both enable outputs for Elasticsearch and Logstash?

**URL:** <https://discuss.elastic.co/t/can-we-both-enable-outputs-for-elasticsearch-and-logstash/124805>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 20, 2018, 3:22pm UTC](https://discuss.elastic.co/t/can-we-both-enable-outputs-for-elasticsearch-and-logstash/124805 "2018-03-20T15:22:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackyshen](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jackyshen](https://discuss.elastic.co/u/jackyshen)\
**Post date:** [March 20, 2018, 3:22pm UTC](https://discuss.elastic.co/t/can-we-both-enable-outputs-for-elasticsearch-and-logstash/124805/1 "2018-03-20T15:22:37Z")

</div>

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"]

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [March 21, 2018, 2:17pm UTC](https://discuss.elastic.co/t/can-we-both-enable-outputs-for-elasticsearch-and-logstash/124805/2 "2018-03-21T14:17:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jackyshen](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jackyshen](https://discuss.elastic.co/u/jackyshen)\
**Post date:** [March 22, 2018, 1:41am UTC](https://discuss.elastic.co/t/can-we-both-enable-outputs-for-elasticsearch-and-logstash/124805/3 "2018-03-22T01:41:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [March 22, 2018, 7:47am UTC](https://discuss.elastic.co/t/can-we-both-enable-outputs-for-elasticsearch-and-logstash/124805/4 "2018-03-22T07:47:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yodog](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yodog/32/4822_2.png) [@yodog](https://discuss.elastic.co/u/yodog)\
**Post date:** [March 23, 2018, 5:49pm UTC](https://discuss.elastic.co/t/can-we-both-enable-outputs-for-elasticsearch-and-logstash/124805/5 "2018-03-23T17:49:07Z")

</div>

> [@Two filebeat instances](https://discuss.elastic.co/t/two-filebeat-instances/123132):
>
> can i get two filebeat instances working at the same time, one sending to elasticsearch and the other to logstash? i have lots of messages being parsed by logstash (postfix, cyrus) and it would be too much trouble migrating everything. on the other hand, i like the [simple] way filebeat works with elasticsearch, installing kibana dashboards and so on.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 20, 2018, 5:49pm UTC](https://discuss.elastic.co/t/can-we-both-enable-outputs-for-elasticsearch-and-logstash/124805/6 "2018-04-20T17:49:12Z")

</div>

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