# Do something when Logstash has finished processing

**URL:** <https://discuss.elastic.co/t/do-something-when-logstash-has-finished-processing/132729>\
**Category:** Logstash\
**Created:** [May 22, 2018, 7:08am UTC](https://discuss.elastic.co/t/do-something-when-logstash-has-finished-processing/132729 "2018-05-22T07:08:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saramali](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@saramali](https://discuss.elastic.co/u/saramali)\
**Post date:** [May 22, 2018, 7:08am UTC](https://discuss.elastic.co/t/do-something-when-logstash-has-finished-processing/132729/1 "2018-05-22T07:08:56Z")

</div>

Is there any way I can know that logstash has finished processing a log file. I know logstash is meant to read data streams but is there a work around by which I can know logstash has finished processing of the file which in my case would be that it has reached end of file.

In my use case I want to move the file to archive once it has been processed completely by logstash. This is kind of batch processing in which the log files aren't data streams but are static.

I found something on GIT

> <https://github.com/logstash-plugins/logstash-input-file/blob/master/CHANGELOG.md>

How can I install this plugin and use it. I can't find any instructions regarding how to use it.

---

<div class="post-metadata">

**Author:** ![paz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paz/32/28003_2.png) [@paz](https://discuss.elastic.co/u/paz)\
**Post date:** [May 22, 2018, 9:58am UTC](https://discuss.elastic.co/t/do-something-when-logstash-has-finished-processing/132729/2 "2018-05-22T09:58:24Z")

</div>

Not inherently, no. What you can do is monitor your since\_db file with a script and check periodically for files that have been fully processed (based on the size listed in the since\_db file).

---

<div class="post-metadata">

**Author:** ![saramali](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@saramali](https://discuss.elastic.co/u/saramali)\
**Post date:** [May 22, 2018, 10:00am UTC](https://discuss.elastic.co/t/do-something-when-logstash-has-finished-processing/132729/3 "2018-05-22T10:00:10Z")

</div>

@paz well I found an input plugin which seems like will do the job.

> **[logstash-plugins/logstash-input-file](https://github.com/logstash-plugins/logstash-input-file)**
>
> Contribute to logstash-input-file development by creating an account on GitHub.

---

<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:** [June 19, 2018, 10:00am UTC](https://discuss.elastic.co/t/do-something-when-logstash-has-finished-processing/132729/4 "2018-06-19T10:00:12Z")

</div>

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