# Expected Behavior When \`flush\_interval\` = \`clear\_interval\`?

**URL:** https://discuss.elastic.co/t/expected-behavior-when-flush-interval-clear-interval/153681
**Category:** Logstash
**Created:** [October 23, 2018, 8:55pm UTC](https://discuss.elastic.co/t/expected-behavior-when-flush-interval-clear-interval/153681 "2018-10-23T20:55:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Alsheh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alsheh/32/36799_2.png) [@Alsheh](https://discuss.elastic.co/u/Alsheh)
#### Post date: [October 23, 2018, 8:55pm UTC](https://discuss.elastic.co/t/expected-behavior-when-flush-interval-clear-interval/153681/1 "2018-10-23T20:55:29Z")

</div>

In the metrics filter, what is the expected behavior when `flush_interval` is equal to `clear_interval`? Is there any possible race condition behavior here where counters get reset before events get flushed?

```auto
filter {
  metrics {
	meter => ["http_%{response}"]
	flush_interval => 60
	clear_interval => 60
	add_tag => ['metric']
  }
}

```

---

<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: [November 20, 2018, 8:55pm UTC](https://discuss.elastic.co/t/expected-behavior-when-flush-interval-clear-interval/153681/2 "2018-11-20T20:55:33Z")

</div>

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