# Elasticsearch plugin - is there a way to keep it forever listening

**URL:** https://discuss.elastic.co/t/elasticsearch-plugin-is-there-a-way-to-keep-it-forever-listening/27484
**Category:** Logstash
**Created:** [August 17, 2015, 8:51am UTC](https://discuss.elastic.co/t/elasticsearch-plugin-is-there-a-way-to-keep-it-forever-listening/27484 "2015-08-17T08:51:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Cjtow](https://avatars.discourse-cdn.com/v4/letter/c/7ab992/32.png) [@Cjtow](https://discuss.elastic.co/u/Cjtow)
#### Post date: [August 17, 2015, 8:51am UTC](https://discuss.elastic.co/t/elasticsearch-plugin-is-there-a-way-to-keep-it-forever-listening/27484/1 "2015-08-17T08:51:31Z")

</div>

Good morning,  
At the moment, I have a query and it runs against the Logstash-\* index but once it's done reading from today's date it closes the connection.

Is there a way to keep it always running so it will pick up any new logs? I tried adding stdin plugin to keep the script running, but after the Elasticsearch has done it's reading, it still closes the Elasticsearch part of the connection.

Please could someone help? Thank you for your time  
Kind regards,  
Chris

---

<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: [August 17, 2015, 10:07am UTC](https://discuss.elastic.co/t/elasticsearch-plugin-is-there-a-way-to-keep-it-forever-listening/27484/2 "2015-08-17T10:07:08Z")

</div>

If you want to continuously monitor logs as they arrive it seems like a better idea to have them sent to a message broker like Redis or RabbitMQ.

---

<div class="post-metadata">

### Author: ![Cjtow](https://avatars.discourse-cdn.com/v4/letter/c/7ab992/32.png) [@Cjtow](https://discuss.elastic.co/u/Cjtow)
#### Post date: [August 17, 2015, 11:15am UTC](https://discuss.elastic.co/t/elasticsearch-plugin-is-there-a-way-to-keep-it-forever-listening/27484/3 "2015-08-17T11:15:01Z")

</div>

Hi Magnus,

Thanks for your response, I have a fairly unique project where I have to pull the data from an Elasticsearch cluster rather than it getting pushed to a datasource. Not by choice unfortunately. I have a Logstash instance that pulls from a source Elasticsearch cluster and then pushes to syslog. Ideally live. at the moment I can do it so I can get yesterday's news. But Ideally, I would like what's happening right now.

If that's not possible then I'll have to stick with getting yesterday's logs. Unless the software above can relay from elasticsearch in a similar way?

Thanks again,

---

<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:31am UTC](https://discuss.elastic.co/t/elasticsearch-plugin-is-there-a-way-to-keep-it-forever-listening/27484/4 "2017-07-06T05:31:48Z")

</div>


