# Logstash plugin flush

**URL:** https://discuss.elastic.co/t/logstash-plugin-flush/25561
**Category:** Logstash
**Created:** [July 14, 2015, 11:17pm UTC](https://discuss.elastic.co/t/logstash-plugin-flush/25561 "2015-07-14T23:17:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![karthikbox](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@karthikbox](https://discuss.elastic.co/u/karthikbox)
#### Post date: [July 14, 2015, 11:17pm UTC](https://discuss.elastic.co/t/logstash-plugin-flush/25561/1 "2015-07-14T23:17:53Z")

</div>

Hi all,

I've been writing a custom filter plugin for logstash.  
I have a cleanup method which needs to be called periodically (lets say 3 sec).  
I understand that this is achievable by overriding "flush" method in my plugin. How often will this method be called by LogStash? Is this time interval configurable? Any help would be appreciated.

Thanks.

---

<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:34am UTC](https://discuss.elastic.co/t/logstash-plugin-flush/25561/2 "2017-07-06T05:34:47Z")

</div>


