# Logstash integrate with Elasticsearch

**URL:** <https://discuss.elastic.co/t/logstash-integrate-with-elasticsearch/24361>\
**Category:** Logstash\
**Created:** [June 25, 2015, 5:10pm UTC](https://discuss.elastic.co/t/logstash-integrate-with-elasticsearch/24361 "2015-06-25T17:10:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumarhanu](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kumarhanu](https://discuss.elastic.co/u/kumarhanu)\
**Post date:** [June 25, 2015, 5:10pm UTC](https://discuss.elastic.co/t/logstash-integrate-with-elasticsearch/24361/1 "2015-06-25T17:10:28Z")

</div>

Trying to send output to elasticsearch from logstash is not working in windows. elasticsearch is running on it default port. Both are latest versions.

logstash -e 'input { stdin {} } output { elasticsearch { host =\> "localhost" } }'

---

<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:** [June 25, 2015, 5:22pm UTC](https://discuss.elastic.co/t/logstash-integrate-with-elasticsearch/24361/2 "2015-06-25T17:22:21Z")

</div>

Are you typing text directly to Logstash's stdin in your command console?

- If yes, is there no output from Logstash at all? What if you start it with `--verbose` or `--debug`?
- If no, how _are_ you feeding it data?

---

<div class="post-metadata">

**Author:** ![kumarhanu](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kumarhanu](https://discuss.elastic.co/u/kumarhanu)\
**Post date:** [June 25, 2015, 5:27pm UTC](https://discuss.elastic.co/t/logstash-integrate-with-elasticsearch/24361/3 "2015-06-25T17:27:10Z")

</div>

Yes. Trying from command prompt. I would like to feed the data from stdin after logstash is started.

But this command is working  
\bin\>logstash -e 'input { stdin {} } output { stdout {} }'  
io/console not supported; tty will not be manipulated  
Logstash startup completed

---

<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:** [June 25, 2015, 5:48pm UTC](https://discuss.elastic.co/t/logstash-integrate-with-elasticsearch/24361/4 "2015-06-25T17:48:08Z")

</div>

Yes, Logstash has started and is waiting for you to type something and press Enter.

---

<div class="post-metadata">

**Author:** ![kumarhanu](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kumarhanu](https://discuss.elastic.co/u/kumarhanu)\
**Post date:** [June 26, 2015, 3:10am UTC](https://discuss.elastic.co/t/logstash-integrate-with-elasticsearch/24361/5 "2015-06-26T03:10:10Z")

</div>

Thanks for reply. stdin and stdout is working. But in place of stdout elasticsearch is not working.error in log files:  
"Error: Expected one of #, =\> at line 1, column 50 (byte 50) after output { elasticsearch { host "

---

<div class="post-metadata">

**Author:** ![kumarhanu](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kumarhanu](https://discuss.elastic.co/u/kumarhanu)\
**Post date:** [June 26, 2015, 5:32am UTC](https://discuss.elastic.co/t/logstash-integrate-with-elasticsearch/24361/6 "2015-06-26T05:32:44Z")

</div>

Some how it is working if i run the same command from .conf file.

---

<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:36am UTC](https://discuss.elastic.co/t/logstash-integrate-with-elasticsearch/24361/7 "2017-07-06T05:36:23Z")

</div>


