# Multiple Elasticsearch output errors

**URL:** <https://discuss.elastic.co/t/multiple-elasticsearch-output-errors/47727>\
**Category:** Logstash\
**Created:** [April 19, 2016, 1:33am UTC](https://discuss.elastic.co/t/multiple-elasticsearch-output-errors/47727 "2016-04-19T01:33:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bstascavage](https://avatars.discourse-cdn.com/v4/letter/b/3bc359/32.png) [@bstascavage](https://discuss.elastic.co/u/bstascavage)\
**Post date:** [April 19, 2016, 1:33am UTC](https://discuss.elastic.co/t/multiple-elasticsearch-output-errors/47727/1 "2016-04-19T01:33:26Z")

</div>

Hi all! I am trying to setup my Logstash instance to output to two separate Elasticsearch clusters (Logstash version: 2.3.1). Logstash indexes to both Elasticsearch clusters just fine in till one cluster becomes unavailable. When that happens, Logstash stops indexing into BOTH clusters. Instead, I want Logstash to keep indexing into the healthy cluster while this happens.

My Logstash config:

`input { kafka { zk_connect => "<ZK_hosts>" group_id => "region1" topic_id => "foo-topic" consumer_timeout_ms => 15000 add_field => { 'logstash-key' => 'foo-topic' 'logstash-region' => 'region1'} fetch_message_max_bytes => 500000000 } kafka { zk_connect => "<ZK_hosts>" group_id => "region2" topic_id => "foo-topic" consumer_timeout_ms => 15000 add_field => { 'logstash-key' => 'foo-topic' 'logstash-region' => 'region2'} fetch_message_max_bytes => 500000000 } } output { if [logstash-key] == 'foo-topic' { if [logstash-region] == "region1" { elasticsearch { hosts => "<region_1_IP>" index => "foo-topic-%{+YYYY.MM.dd}" } } else if [logstash-region] == "region2" { elasticsearch { hosts => "<region_2_IP>" index => "foo-topic-%{+YYYY.MM.dd}" } } } }`

As you can see, the goal here is to consume from one kafka topic using different group\_ids; this way, if an Elasticsearch cluster goes down, Logstash will still index to the other, and when it returns, Logstash will pick up where it left off via that region's group\_id. But this fails because when an Elasticsearch region dies Logstash won't index to _either_ region ☹. Seems to me like either I misconfigured this wrong, or this is a bug.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 19, 2016, 3:43am UTC](https://discuss.elastic.co/t/multiple-elasticsearch-output-errors/47727/2 "2016-04-19T03:43:34Z")

</div>

This is expected. A single stalled output will stall the entire pipeline.

---

<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:** [July 6, 2017, 5:01am UTC](https://discuss.elastic.co/t/multiple-elasticsearch-output-errors/47727/3 "2017-07-06T05:01:42Z")

</div>


