# How can you know that a logstash input query has finished

**URL:** https://discuss.elastic.co/t/how-can-you-know-that-a-logstash-input-query-has-finished/346173
**Category:** Logstash
**Created:** [November 1, 2023, 5:55am UTC](https://discuss.elastic.co/t/how-can-you-know-that-a-logstash-input-query-has-finished/346173 "2023-11-01T05:55:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dimitris\_sb](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dimitris\_sb](https://discuss.elastic.co/u/dimitris_sb)
#### Post date: [November 1, 2023, 5:55am UTC](https://discuss.elastic.co/t/how-can-you-know-that-a-logstash-input-query-has-finished/346173/1 "2023-11-01T05:55:03Z")

</div>

Hi All,  
If you deploy a logstash pipeline using the input plugin with a query, how could you know that ingesting data has been completed to decommission it?

Thank you in advance for your insight

---

<div class="post-metadata">

### Author: ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)
#### Post date: [November 2, 2023, 3:22pm UTC](https://discuss.elastic.co/t/how-can-you-know-that-a-logstash-input-query-has-finished/346173/2 "2023-11-02T15:22:31Z")

</div>

Hi @dimitris_sb,

Welcome back! I did find a [similar StackOverflow question](https://stackoverflow.com/questions/56775421/know-when-logstash-has-finished-processing-everything-in-its-pipelines) which suggested looking at the [event stats API](https://www.elastic.co/guide/en/logstash/current/node-stats-api.html#event-stats) for an approximate idea.

Give it a try and let us know if it helps!

---

<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: [November 30, 2023, 3:22pm UTC](https://discuss.elastic.co/t/how-can-you-know-that-a-logstash-input-query-has-finished/346173/3 "2023-11-30T15:22:53Z")

</div>

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