# Fleet: Logstash Load Balancing?

**URL:** https://discuss.elastic.co/t/fleet-logstash-load-balancing/341479
**Category:** Elastic Agent
**Tags:** fleet
**Created:** [August 23, 2023, 1:02pm UTC](https://discuss.elastic.co/t/fleet-logstash-load-balancing/341479 "2023-08-23T13:02:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![DefensiveDepth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/defensivedepth/32/110034_2.png) [@DefensiveDepth](https://discuss.elastic.co/u/DefensiveDepth)
#### Post date: [August 23, 2023, 1:02pm UTC](https://discuss.elastic.co/t/fleet-logstash-load-balancing/341479/1 "2023-08-23T13:02:32Z")

</div>

I don't see this documented anywhere. For Fleet-managed Logstash Output, is there a way to loadbalance among the Logstash endpoints specified?

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [August 23, 2023, 1:18pm UTC](https://discuss.elastic.co/t/fleet-logstash-load-balancing/341479/2 "2023-08-23T13:18:06Z")

</div>

Hello Josh,

Take a look here: [Logstash output | Fleet and Elastic Agent Guide [8.11] | Elastic](https://www.elastic.co/guide/en/fleet/current/logstash-output.html#output-logstash-performance-tuning-settings)

> loadbalance - If `true` and multiple Logstash hosts are configured, the output plugin load balances published events onto all Logstash hosts. If `false`, the output plugin sends all events to one host (determined at random) and switches to another host if the selected one becomes unresponsive.
> 
> **Default:** `false`

So you would add `loadbalance: true` in the advanced YAML configuration of the output. (Disclaimer: I do not use it myself)

Best regards  
Wolfram

---

<div class="post-metadata">

### Author: ![DefensiveDepth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/defensivedepth/32/110034_2.png) [@DefensiveDepth](https://discuss.elastic.co/u/DefensiveDepth)
#### Post date: [August 23, 2023, 1:22pm UTC](https://discuss.elastic.co/t/fleet-logstash-load-balancing/341479/3 "2023-08-23T13:22:04Z")

</div>

Yes, I did see that, but that is for Standalone, not Fleet-managed.

I can't find the same info for Fleet-managed Logstash Outputs.

---

<div class="post-metadata">

### Author: ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)
#### Post date: [August 23, 2023, 1:28pm UTC](https://discuss.elastic.co/t/fleet-logstash-load-balancing/341479/4 "2023-08-23T13:28:06Z")

</div>

It is the same configuration, you just need to add the multiple hosts in the logstash output.

 ![Screenshot from 2023-08-23 10-26-03](https://us1.discourse-cdn.com/elastic/original/3X/1/d/1da1a37d561d84d095b3ad8680bb7d936ab771bf.png)

Then you add the `loadbalance: true` in the advanced yaml box.

---

<div class="post-metadata">

### Author: ![DefensiveDepth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/defensivedepth/32/110034_2.png) [@DefensiveDepth](https://discuss.elastic.co/u/DefensiveDepth)
#### Post date: [August 23, 2023, 1:44pm UTC](https://discuss.elastic.co/t/fleet-logstash-load-balancing/341479/5 "2023-08-23T13:44:03Z")

</div>

Ok, thanks for the confirmation!

---

<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: [September 20, 2023, 1:45pm UTC](https://discuss.elastic.co/t/fleet-logstash-load-balancing/341479/6 "2023-09-20T13:45:00Z")

</div>

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