# Logstash conf with stdin input not pushing data into elasticsearch

**URL:** <https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485>\
**Category:** Logstash\
**Created:** [March 12, 2018, 6:44am UTC](https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485 "2018-03-12T06:44:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohan\_M](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Mohan\_M](https://discuss.elastic.co/u/Mohan_M)\
**Post date:** [March 12, 2018, 6:44am UTC](https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485/1 "2018-03-12T06:44:47Z")

</div>

Hello all,

I am new to elastic stack I have configured a elastic stack with xpack. when it tried to run a simple logstash conf with stdin input and elasticsearch output. it is not getting inserted into elasticsearch but stdout is return the value, not sure what is missing. please find below code.

> input {  
> stdin {  
> id =\> "my\_test\_id"  
> }  
> }  
> output {  
> stdout {  
> codec =\> rubydebug  
> }  
> elasticsearch {  
> hosts =\> ["x.x.x.x:9200"]  
> index =\> "lionlogstash-%{+YYYY.MM.dd}"  
> }  
> }

---

<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:** [March 12, 2018, 7:07am UTC](https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485/2 "2018-03-12T07:07:40Z")

</div>

> it is not getting inserted into elasticsearch

How do you know?

---

<div class="post-metadata">

**Author:** ![Mohan\_M](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Mohan\_M](https://discuss.elastic.co/u/Mohan_M)\
**Post date:** [March 12, 2018, 7:35am UTC](https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485/3 "2018-03-12T07:35:38Z")

</div>

hello Magnus,

I checked it with curl  
curl --user elastic:password -XGET '[http://x.x.x.x:9200/\_cat/indices?pretty](http://x.x.x.x:9200/_cat/indices?pretty)'  
it returns inly system indexes

---

<div class="post-metadata">

**Author:** ![Mohan\_M](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Mohan\_M](https://discuss.elastic.co/u/Mohan_M)\
**Post date:** [March 12, 2018, 7:55am UTC](https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485/4 "2018-03-12T07:55:32Z")

</div>

while configuring the elastic stack I skipped the ssl part is it mandatory. but I can log in to kibana and see system indexes from the dev tools

---

<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:** [March 12, 2018, 7:57am UTC](https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485/5 "2018-03-12T07:57:26Z")

</div>

Okay, and the elastic user has read access to lionlogstash-\* indexes?

Anyway, if Logstash has problems sending to ES it'll scream about in its log.

---

<div class="post-metadata">

**Author:** ![Mohan\_M](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Mohan\_M](https://discuss.elastic.co/u/Mohan_M)\
**Post date:** [March 12, 2018, 7:57am UTC](https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485/6 "2018-03-12T07:57:49Z")

</div>

I ran it with --verbose and found the below error

> [2018-03-12T11:41:35,163][WARN][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=\>"[http://x.x.x.x:9200/](http://x.x.x.x:9200/)", :error\_type=\>LogStash::Outputs::Elasticsearch::HttpClient::Pool::BadResponseCodeError, :error=\>"Got response code '401' contacting Elasticsearch at URL '[http://172.x.x.x:9200/](http://172.x.x.x:9200/)'"}

---

<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:** [March 12, 2018, 8:07am UTC](https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485/7 "2018-03-12T08:07:23Z")

</div>

You haven't configured the elasticsearch output to authenticate to Elasticsearch even though Elasticsearch requires a username and password.

---

<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:** [April 9, 2018, 8:07am UTC](https://discuss.elastic.co/t/logstash-conf-with-stdin-input-not-pushing-data-into-elasticsearch/123485/8 "2018-04-09T08:07:32Z")

</div>

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