# Auto\_flush\_interval in exec module

**URL:** https://discuss.elastic.co/t/auto-flush-interval-in-exec-module/295863
**Category:** Logstash
**Created:** [January 31, 2022, 3:42pm UTC](https://discuss.elastic.co/t/auto-flush-interval-in-exec-module/295863 "2022-01-31T15:42:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jeleb](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jeleb](https://discuss.elastic.co/u/jeleb)
#### Post date: [January 31, 2022, 3:42pm UTC](https://discuss.elastic.co/t/auto-flush-interval-in-exec-module/295863/1 "2022-01-31T15:42:01Z")

</div>

Hi,

I have a problem with `auto_flush_interval`

I want to check the command result

logstash.conf:

```auto
input {                                                                                                                                                
  exec {                                                                                                                                               
       command => "lmstat -a -c"                                                                       
       interval => "60"                                                                                                                
       codec => multiline {                                                                                                                            
             pattern => "^Users of .*"                                                                                                                 
             negate => true                                                                                                                            
             what => "previous"                                                                                                                        
             auto_flush_interval => "1"                                                                                                                
       }                                                                                                                                               
  }                                                                                                                                                    
}                                                                                                                                                      
                                                                                                                                                       
filter {                                                                                                                                               
}                                                                                                                                                      
                                                                                                                                                       
output {                                                                                                                                               
  stdout { codec => rubydebug }                                                                                                                        
} 

```

The command result is:

```auto
Users of LicenseSoftware_01: (Total of 50 licenses issued; Total of 2 licenses in use)                                                                    
  "LicenseSoftware" v1.0, vendor: VendorName, expiry: 31-dec-2021                                                                                      
                                                                                                                                                       
Users of LicenseSoftware_02: (Total of 50 licenses issued; Total of 4 licenses in use)                                                                    
  "LicenseSoftware" v1.0, vendor: VendorName, expiry: 31-dec-2021                                                                                      
                                                                        

```

With this conf, the last line is not flush after 1 second (`auto_flush_interval` delay), but after 60 seconds (`interval` delay).

Does the `auto_flush_interval` works correctly with the `exec` module ?  
How do I flush, the `interval` value is about on day in real life ?

---

<div class="post-metadata">

### Author: ![jeleb](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jeleb](https://discuss.elastic.co/u/jeleb)
#### Post date: [February 15, 2022, 9:03am UTC](https://discuss.elastic.co/t/auto-flush-interval-in-exec-module/295863/2 "2022-02-15T09:03:39Z")

</div>

Does someone use `auto_flush_interval` with `exec` module ?

Thank you for your answers, it can help me a lot

---

<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: [March 15, 2022, 9:04am UTC](https://discuss.elastic.co/t/auto-flush-interval-in-exec-module/295863/3 "2022-03-15T09:04:04Z")

</div>

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