# Auto\_flush\_interval not working inside my exec plugin

**URL:** https://discuss.elastic.co/t/auto-flush-interval-not-working-inside-my-exec-plugin/247990
**Category:** Logstash
**Created:** [September 9, 2020, 11:10am UTC](https://discuss.elastic.co/t/auto-flush-interval-not-working-inside-my-exec-plugin/247990 "2020-09-09T11:10:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sharma\_yash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma_yash/32/61112_2.png) [@sharma\_yash](https://discuss.elastic.co/u/sharma_yash)
#### Post date: [September 9, 2020, 11:10am UTC](https://discuss.elastic.co/t/auto-flush-interval-not-working-inside-my-exec-plugin/247990/1 "2020-09-09T11:10:01Z")

</div>

Hi,

I am executing a command using exec plugin. I am getting the response OK. I wanted to keep all the response lines in a single event.

```auto
exec{
command => "my command"
interval => 300

# To tackle this, I use multiline codec
codec => multiline {
    pattern => ".*"
    negate => false
    what => "previous"
   # Event was not processing after terminating the command so I used 
    auto_flush_interval => 5
}

}

```

But seems auto\_flush\_interval is not working.  
How can I flush event after my last line. Any suggestions?

Thanks

---

<div class="post-metadata">

### Author: ![sharma\_yash](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma_yash/32/61112_2.png) [@sharma\_yash](https://discuss.elastic.co/u/sharma_yash)
#### Post date: [September 10, 2020, 1:09am UTC](https://discuss.elastic.co/t/auto-flush-interval-not-working-inside-my-exec-plugin/247990/2 "2020-09-10T01:09:47Z")

</div>

Resolved it myself. exec plugin by default wraps all the response line in a single event. So multiline codec is not required.

---

<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: [October 8, 2020, 1:10am UTC](https://discuss.elastic.co/t/auto-flush-interval-not-working-inside-my-exec-plugin/247990/3 "2020-10-08T01:10:10Z")

</div>

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