# Send logs to 2 logstash servers simultaneously

**URL:** <https://discuss.elastic.co/t/send-logs-to-2-logstash-servers-simultaneously/133249>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 25, 2018, 4:51am UTC](https://discuss.elastic.co/t/send-logs-to-2-logstash-servers-simultaneously/133249 "2018-05-25T04:51:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tharu85](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tharu85](https://discuss.elastic.co/u/tharu85)\
**Post date:** [May 25, 2018, 4:51am UTC](https://discuss.elastic.co/t/send-logs-to-2-logstash-servers-simultaneously/133249/1 "2018-05-25T04:51:28Z")

</div>

My requirement is to configure filebeat output as two logstash servers and I need to send logs to defined 2 servers simultaneously. It is not load balance scenario. Both logstash servers should received same data.

I do following configuration. But it doesn't gave me the expected output. Only single logstash server received the log

```
output.logstash:
   hosts: ["172.10.100.1:514", "172.20.200.1:514"]
```

---

<div class="post-metadata">

**Author:** ![Debashis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debashis/32/45290_2.png) [@Debashis](https://discuss.elastic.co/u/Debashis)\
**Post date:** [May 25, 2018, 5:09am UTC](https://discuss.elastic.co/t/send-logs-to-2-logstash-servers-simultaneously/133249/2 "2018-05-25T05:09:11Z")

</div>

Hi @tharu85, do you want to achieve this scenario by only running one instance of filebeat on your log server or multiple instances of filebeat is ok for you?

---

<div class="post-metadata">

**Author:** ![tharu85](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tharu85](https://discuss.elastic.co/u/tharu85)\
**Post date:** [May 25, 2018, 5:38am UTC](https://discuss.elastic.co/t/send-logs-to-2-logstash-servers-simultaneously/133249/3 "2018-05-25T05:38:27Z")

</div>

Using single filebeat agent in a server.

---

<div class="post-metadata">

**Author:** ![Debashis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debashis/32/45290_2.png) [@Debashis](https://discuss.elastic.co/u/Debashis)\
**Post date:** [May 28, 2018, 4:51am UTC](https://discuss.elastic.co/t/send-logs-to-2-logstash-servers-simultaneously/133249/4 "2018-05-28T04:51:44Z")

</div>

Hi @tharu85,

Filebeat is implemented in such a way that, when user configures multiple logstash server as output in "hosts" section and load balancing is not configured then, it takes any one mentioned host randomly and send the data to that server only. If one of the mentioned server is not reachable then it takes any one server from other mentioned host as well.

For detail available Logstash output configuration parameters you can refer  
[Logstash Output configuration](https://www.elastic.co/guide/en/beats/filebeat/6.2/logstash-output.html)

---

<div class="post-metadata">

**Author:** ![tharu85](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tharu85](https://discuss.elastic.co/u/tharu85)\
**Post date:** [May 28, 2018, 6:27am UTC](https://discuss.elastic.co/t/send-logs-to-2-logstash-servers-simultaneously/133249/5 "2018-05-28T06:27:24Z")

</div>

Hi @Debashis,

My requirement is not load balancing.

I need to send same log to 2 different destination at same time.

How can I meet my requirement by configuring filebeat ?

---

<div class="post-metadata">

**Author:** ![Debashis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/debashis/32/45290_2.png) [@Debashis](https://discuss.elastic.co/u/Debashis)\
**Post date:** [May 28, 2018, 9:05am UTC](https://discuss.elastic.co/t/send-logs-to-2-logstash-servers-simultaneously/133249/6 "2018-05-28T09:05:17Z")

</div>

Hello @tharu85

Filebeat does not support to send same data to multiple logstash server simultaneously . To achieve this you have to start multiple instances of Filebeat with different logstash server configuration. This is the limitation of Filebeat output plugin

To start multiple instances of filebeat in same host, you can refer the below link  
[https://discuss.elastic.co/t/how-to-install-and-configure-multiple-filebeat-in-linux-instance/130466/3](https://discuss.elastic.co/t/how-to-install-and-configure-multiple-filebeat-in-linux-instance/130466/3)

---

<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:** [June 25, 2018, 9:05am UTC](https://discuss.elastic.co/t/send-logs-to-2-logstash-servers-simultaneously/133249/7 "2018-06-25T09:05:18Z")

</div>

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