# Filebeat does not loadbalance if hosts are from same subnet and a different subnet

**URL:** <https://discuss.elastic.co/t/filebeat-does-not-loadbalance-if-hosts-are-from-same-subnet-and-a-different-subnet/116846>\
**Category:** Beats\
**Created:** [January 24, 2018, 10:31am UTC](https://discuss.elastic.co/t/filebeat-does-not-loadbalance-if-hosts-are-from-same-subnet-and-a-different-subnet/116846 "2018-01-24T10:31:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ihjaz](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@Ihjaz](https://discuss.elastic.co/u/Ihjaz)\
**Post date:** [January 24, 2018, 10:31am UTC](https://discuss.elastic.co/t/filebeat-does-not-loadbalance-if-hosts-are-from-same-subnet-and-a-different-subnet/116846/1 "2018-01-24T10:31:46Z")

</div>

Hi,

I have the following configuration in my filebeat.yml .

```
#----------------------------- Logstash output --------------------------------
output.logstash:
  # The Logstash hosts
  hosts: ["10.133.132.xxx:5044", "10.129.xxx.xxx:5044"]
  loadbalance: true

```

The server where the filebeat is running belongs to the network 10.133.132.x. When I try the above configuration I see that the logs are getting shipped only to the host on the same network even though the loadbalance is enabled.

There are no errors in the filebeat.log so connectivity is good.

---

<div class="post-metadata">

**Author:** ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)\
**Post date:** [January 24, 2018, 5:01pm UTC](https://discuss.elastic.co/t/filebeat-does-not-loadbalance-if-hosts-are-from-same-subnet-and-a-different-subnet/116846/2 "2018-01-24T17:01:20Z")

</div>

The output's load balancing make no distinction between subnets, you should see logs shipped to both hosts. Maybe there is a configuration problem in one of the logstash hosts and is dropping events?

---

<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:** [February 14, 2018, 10:31am UTC](https://discuss.elastic.co/t/filebeat-does-not-loadbalance-if-hosts-are-from-same-subnet-and-a-different-subnet/116846/3 "2018-02-14T10:31:53Z")

</div>

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