# Restarting Logstash with ES input

**URL:** <https://discuss.elastic.co/t/restarting-logstash-with-es-input/44724>\
**Category:** Elasticsearch\
**Created:** [March 17, 2016, 3:19pm UTC](https://discuss.elastic.co/t/restarting-logstash-with-es-input/44724 "2016-03-17T15:19:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoaquinS](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@JoaquinS](https://discuss.elastic.co/u/JoaquinS)\
**Post date:** [March 17, 2016, 3:19pm UTC](https://discuss.elastic.co/t/restarting-logstash-with-es-input/44724/1 "2016-03-17T15:19:14Z")

</div>

Hi, I have a question about what happens when you restart Logstash with ES input. It will read from the beginning of the index or it will continue from where it was?.

Regards

---

<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:** [March 18, 2016, 12:17am UTC](https://discuss.elastic.co/t/restarting-logstash-with-es-input/44724/2 "2016-03-18T00:17:47Z")

</div>

Depends, are you using scan/scroll or just a query?

---

<div class="post-metadata">

**Author:** ![JoaquinS](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@JoaquinS](https://discuss.elastic.co/u/JoaquinS)\
**Post date:** [March 18, 2016, 12:44am UTC](https://discuss.elastic.co/t/restarting-logstash-with-es-input/44724/3 "2016-03-18T00:44:06Z")

</div>

I'm using scroll, like this:

elasticsearch {  
hosts =\> "[es.production.mysite.org](http://es.production.mysite.org)"  
index =\> "mydata-2018.09.\*"  
size =\> 500  
scroll =\> "5m"  
}

---

<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:** [March 18, 2016, 2:13am UTC](https://discuss.elastic.co/t/restarting-logstash-with-es-input/44724/4 "2016-03-18T02:13:22Z")

</div>

I don't believe we keep the scroll ID anywhere persistent, so it'd start from the beginning again.

---

<div class="post-metadata">

**Author:** ![JoaquinS](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@JoaquinS](https://discuss.elastic.co/u/JoaquinS)\
**Post date:** [March 21, 2016, 9:46pm UTC](https://discuss.elastic.co/t/restarting-logstash-with-es-input/44724/5 "2016-03-21T21:46:46Z")

</div>

That are bad news.  
Thanks

---

<div class="post-metadata">

**Author:** ![harithayalavarthi](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@harithayalavarthi](https://discuss.elastic.co/u/harithayalavarthi)\
**Post date:** [February 15, 2017, 5:45pm UTC](https://discuss.elastic.co/t/restarting-logstash-with-es-input/44724/6 "2017-02-15T17:45:17Z")

</div>

Is there any other way that we can force logstash to start it from failed position . Is it possible by using query in ES input?

---

<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 5, 2017, 10:03pm UTC](https://discuss.elastic.co/t/restarting-logstash-with-es-input/44724/7 "2017-07-05T22:03:11Z")

</div>


