# How connect logstash to elasticsearch cluster?

**URL:** <https://discuss.elastic.co/t/how-connect-logstash-to-elasticsearch-cluster/62608>\
**Category:** Logstash\
**Created:** [October 10, 2016, 7:46am UTC](https://discuss.elastic.co/t/how-connect-logstash-to-elasticsearch-cluster/62608 "2016-10-10T07:46:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amin1](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Amin1](https://discuss.elastic.co/u/Amin1)\
**Post date:** [October 10, 2016, 7:46am UTC](https://discuss.elastic.co/t/how-connect-logstash-to-elasticsearch-cluster/62608/1 "2016-10-10T07:46:33Z")

</div>

hi  
i use this scale to manage my log in medium network 🙂  
Source ----\>Logstash------\>Redis--------\>Logstash--------\> Elasticsearch cluster  
I have one Client Node, 3 Data -node, 1 master node.  
now i have following question :  
1- in logstash output I dont know that i must set master ip or client ip ?  
2- when i type this command " curl -XGET '[http://kbn:9200/\_cluster/health?pretty=true](http://kbn:9200/_cluster/health?pretty=true)' " in client node the following message appear :

{  
"cluster\_name" : "cenlog",  
"status" : "green",  
"timed\_out" : false,  
"number\_of\_nodes" : 4,  
"number\_of\_data\_nodes" : 2,  
"active\_primary\_shards" : 96,  
"active\_shards" : 192,  
"relocating\_shards" : 0,  
"initializing\_shards" : 0,  
"unassigned\_shards" : 0,  
"delayed\_unassigned\_shards" : 0,  
"number\_of\_pending\_tasks" : 0,  
"number\_of\_in\_flight\_fetch" : 0,  
"task\_max\_waiting\_in\_queue\_millis" : 0,  
"active\_shards\_percent\_as\_number" : 100.0  
}

in this message i have only 2 data-node but actually I config 3 data node

i would happy if help me

Thanks .

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 10, 2016, 7:47am UTC](https://discuss.elastic.co/t/how-connect-logstash-to-elasticsearch-cluster/62608/2 "2016-10-10T07:47:29Z")

</div>

1. Client nodes.

2. What does `_cat/nodes` show?

---

<div class="post-metadata">

**Author:** ![Amin1](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Amin1](https://discuss.elastic.co/u/Amin1)\
**Post date:** [October 10, 2016, 8:00am UTC](https://discuss.elastic.co/t/how-connect-logstash-to-elasticsearch-cluster/62608/3 "2016-10-10T08:00:07Z")

</div>

[root@KBN ~]# curl -XGET 'kbn:9200/\_cat/nodes'  
172.24.36.24 172.24.36.24 16 38 0.00 d - es-data-01  
172.24.36.25 172.24.36.25 17 39 0.16 d - es-data-02  
172.24.36.21 172.24.36.21 11 97 0.00 - \* es-master-01  
172.24.36.27 172.24.36.27 4 59 0.04 c - es-client-01

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 10, 2016, 8:05am UTC](https://discuss.elastic.co/t/how-connect-logstash-to-elasticsearch-cluster/62608/4 "2016-10-10T08:05:24Z")

</div>

Maybe your config is wrong then? It's only showing 2 data nodes.

---

<div class="post-metadata">

**Author:** ![Amin1](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Amin1](https://discuss.elastic.co/u/Amin1)\
**Post date:** [October 10, 2016, 8:14am UTC](https://discuss.elastic.co/t/how-connect-logstash-to-elasticsearch-cluster/62608/5 "2016-10-10T08:14:24Z")

</div>

no the same config as another data nodes

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 10, 2016, 9:33am UTC](https://discuss.elastic.co/t/how-connect-logstash-to-elasticsearch-cluster/62608/6 "2016-10-10T09:33:42Z")

</div>

> [@Amin1](#):
>
> 172.24.36.24 172.24.36.24 16 38 0.00 d - es-data-01  
> 172.24.36.25 172.24.36.25 17 39 0.16 d - es-data-02  
> 172.24.36.21 172.24.36.21 11 97 0.00 - \* es-master-01  
> 172.24.36.27 172.24.36.27 4 59 0.04 c - es-client-01

This shows that the cluster has 2 data nodes, 1 dedicated master mode and 1 client node. They even appear names accordingly. Check the config on the nodes.

---

<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, 4:34am UTC](https://discuss.elastic.co/t/how-connect-logstash-to-elasticsearch-cluster/62608/7 "2017-07-06T04:34:55Z")

</div>


