# Filebeat logstash output loadbalance not working properly (not random)

**URL:** <https://discuss.elastic.co/t/filebeat-logstash-output-loadbalance-not-working-properly-not-random/51541>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [June 1, 2016, 9:50am UTC](https://discuss.elastic.co/t/filebeat-logstash-output-loadbalance-not-working-properly-not-random/51541 "2016-06-01T09:50:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![XavierGattuso](https://avatars.discourse-cdn.com/v4/letter/x/c89c15/32.png) [@XavierGattuso](https://discuss.elastic.co/u/XavierGattuso)\
**Post date:** [June 1, 2016, 9:50am UTC](https://discuss.elastic.co/t/filebeat-logstash-output-loadbalance-not-working-properly-not-random/51541/1 "2016-06-01T09:50:10Z")

</div>

Hello,

I'm currently using filebeat 1.2.3, on Debian Jessie and unless I do not understand properly the documentation about the use of a host list and loadbalance: false in the logstash output, it seems not working as expected.

"...If set to false, the output plugin sends all events to only one host (determined at random) and will switch to another host if the selected one..."

It's always picking the host1 never host2.  
I tried over 25 machines...

```auto
  ### Logstash as output
  logstash:
    # The Logstash hosts
    hosts: ["host1:5044","host2:5044"]

    # Number of workers per Logstash host.
    #worker: 1

    # Optional load balance the events between the Logstash hosts
    loadbalance: false

```

I'm I missing something? Or it is a bug?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [June 1, 2016, 10:01am UTC](https://discuss.elastic.co/t/filebeat-logstash-output-loadbalance-not-working-properly-not-random/51541/2 "2016-06-01T10:01:27Z")

</div>

Can you try filebeat 5.0 alpha3?

In 1.x releases there is a bug regarding the random number generator not being initialized correctly.

---

<div class="post-metadata">

**Author:** ![XavierGattuso](https://avatars.discourse-cdn.com/v4/letter/x/c89c15/32.png) [@XavierGattuso](https://discuss.elastic.co/u/XavierGattuso)\
**Post date:** [June 1, 2016, 3:55pm UTC](https://discuss.elastic.co/t/filebeat-logstash-output-loadbalance-not-working-properly-not-random/51541/3 "2016-06-01T15:55:47Z")

</div>

Hello,

I'll try as soon as possible. But as I need to go in production soon, you can understand that's not an acceptable workaround.

I'm also available to do some advanced testing if needed.

Thank you very much.

Regards.

---

<div class="post-metadata">

**Author:** ![XavierGattuso](https://avatars.discourse-cdn.com/v4/letter/x/c89c15/32.png) [@XavierGattuso](https://discuss.elastic.co/u/XavierGattuso)\
**Post date:** [June 6, 2016, 7:21am UTC](https://discuss.elastic.co/t/filebeat-logstash-output-loadbalance-not-working-properly-not-random/51541/4 "2016-06-06T07:21:55Z")

</div>

Hello,

so I tried with filebeat-5.0.0-alpha3 and apparently it works.

So what's next?

Regards.

---

<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 22, 2016, 9:50am UTC](https://discuss.elastic.co/t/filebeat-logstash-output-loadbalance-not-working-properly-not-random/51541/5 "2016-06-22T09:50:17Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
