# Alert if index has 0 documents in last X minutes (Rules and connectors or Detection Rules)

**URL:** https://discuss.elastic.co/t/alert-if-index-has-0-documents-in-last-x-minutes-rules-and-connectors-or-detection-rules/282902
**Category:** Kibana
**Created:** [August 31, 2021, 10:41am UTC](https://discuss.elastic.co/t/alert-if-index-has-0-documents-in-last-x-minutes-rules-and-connectors-or-detection-rules/282902 "2021-08-31T10:41:37Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Patrick\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick_mueller/32/109425_2.png) [@Patrick\_Mueller](https://discuss.elastic.co/u/Patrick_Mueller)
#### Post date: [August 31, 2021, 7:34pm UTC](https://discuss.elastic.co/t/alert-if-index-has-0-documents-in-last-x-minutes-rules-and-connectors-or-detection-rules/282902/2 "2021-08-31T19:34:50Z")

</div>

Hello Gustavo!

I believe you've run into the issue reported here: [index threshold rule does not work as expected with a threshold below a value · Issue #103922 · elastic/kibana · GitHub](https://github.com/elastic/kibana/issues/103922)

We've fixed this in the master branch with this PR: [[Alerting] Allow rule to execute if the value is 0 and that mets the condition by chrisronline · Pull Request #10](https://github.com/elastic/kibana/pull/105626)

According to the labels in the PR, this fix will be available in Kibana 7.14.1 and 7.15.0, when released.

---

_[View the full topic](https://discuss.elastic.co/t/alert-if-index-has-0-documents-in-last-x-minutes-rules-and-connectors-or-detection-rules/282902)._
