# Logstash elsticsearch output

**URL:** https://discuss.elastic.co/t/logstash-elsticsearch-output/253219
**Category:** Logstash
**Created:** [October 24, 2020, 7:38pm UTC](https://discuss.elastic.co/t/logstash-elsticsearch-output/253219 "2020-10-24T19:38:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)
#### Post date: [October 24, 2020, 7:38pm UTC](https://discuss.elastic.co/t/logstash-elsticsearch-output/253219/1 "2020-10-24T19:38:17Z")

</div>

I am running the elasticsearch cluster of 6 node 3 master 2 data 1 coordinate.I am also running logstash in other node for testing purpose which request should go to which node i made pipeline file

```auto
output {
    elasticsearch {
    hosts => ["coordinate1:9200"]
    manage_template => false
    index => "logs-flow-%{+YYYY.MM.dd}"
  }
}

```

I made the changes the host field of output section of elasticsarch in pipeline file  
for example  
`hosts => ["master:9200"] and after some time hosts => ["data1:9200"]`  
after some time i saw that logstash doesn't need to know which elasticsearch is master or data or coordinate.I think elasticsearch will automatically manage the this query like this request is for creating index this request is for holding the data..Am i thinking right ?

---

<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: [November 21, 2020, 7:38pm UTC](https://discuss.elastic.co/t/logstash-elsticsearch-output/253219/2 "2020-11-21T19:38:30Z")

</div>

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