# Perform action when logstash is complete

**URL:** https://discuss.elastic.co/t/perform-action-when-logstash-is-complete/82127
**Category:** Logstash
**Created:** [April 12, 2017, 9:30am UTC](https://discuss.elastic.co/t/perform-action-when-logstash-is-complete/82127 "2017-04-12T09:30:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vinodMS](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinodms/32/13476_2.png) [@vinodMS](https://discuss.elastic.co/u/vinodMS)
#### Post date: [April 12, 2017, 9:30am UTC](https://discuss.elastic.co/t/perform-action-when-logstash-is-complete/82127/1 "2017-04-12T09:30:17Z")

</div>

I'm currently using logstash to pipe data from MySQL and then index this data to elasticsearch.

I have python scripts that creates dynamic logstash configurations and creates subprocesses to run it. But since logstash runs as a subprocess it's not possible for me to know when it's complete. I do track the PIDs of each job but I'd like to perform a certain action when logstash is complete.

Is there any option available in logstash to perfrom post actions? for example update a table entry in mysql or simply execute a script?

---

<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: [April 16, 2017, 6:36pm UTC](https://discuss.elastic.co/t/perform-action-when-logstash-is-complete/82127/2 "2017-04-16T18:36:00Z")

</div>

> Is there any option available in logstash to perfrom post actions?

No, Logstash has no concept of "done".

Are you using the jdbc 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: [May 14, 2017, 6:41pm UTC](https://discuss.elastic.co/t/perform-action-when-logstash-is-complete/82127/3 "2017-05-14T18:41:24Z")

</div>

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