# Alerts when there are no records in a kibana index

**URL:** <https://discuss.elastic.co/t/alerts-when-there-are-no-records-in-a-kibana-index/355053>\
**Category:** Elastic Observability\
**Created:** [March 8, 2024, 6:22pm UTC](https://discuss.elastic.co/t/alerts-when-there-are-no-records-in-a-kibana-index/355053 "2024-03-08T18:22:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edison\_Naranjo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/edison_naranjo/32/132480_2.png) [@Edison\_Naranjo](https://discuss.elastic.co/u/Edison_Naranjo)\
**Post date:** [March 8, 2024, 6:22pm UTC](https://discuss.elastic.co/t/alerts-when-there-are-no-records-in-a-kibana-index/355053/1 "2024-03-08T18:22:59Z")

</div>

Does anyone know how to generate an alert when there are no records in a Kibana index?

---

<div class="post-metadata">

**Author:** ![Gelinski](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gelinski/32/142412_2.png) [@Gelinski](https://discuss.elastic.co/u/Gelinski)\
**Post date:** [June 13, 2024, 2:32am UTC](https://discuss.elastic.co/t/alerts-when-there-are-no-records-in-a-kibana-index/355053/2 "2024-06-13T02:32:57Z")

</div>

What is the Kibana version that you are using?

Tested with 8.14.1

```auto
POST kbn:/api/alerting/rule
{
  "params": {
    "aggType": "count",
    "termSize": 5,
    "thresholdComparator": "<=",
    "timeWindowSize": 5,
    "timeWindowUnit": "m",
    "groupBy": "all",
    "threshold": [
      0
    ],
    "index": [
      "<your index goes here>"
    ],
    "timeField": "@timestamp"
  },
  "consumer": "alerts",
  "schedule": {
    "interval": "1m"
  },
  "tags": [],
  "name": "Index threshold",
  "rule_type_id": ".index-threshold",
  "actions": []
}

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/3/d381d739bd789c638c5a529f6b4a51beda5f050e.png)
