# Create a rule for stopped log alert

**URL:** <https://discuss.elastic.co/t/create-a-rule-for-stopped-log-alert/349009>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [December 11, 2023, 5:23am UTC](https://discuss.elastic.co/t/create-a-rule-for-stopped-log-alert/349009 "2023-12-11T05:23:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhavani90](https://avatars.discourse-cdn.com/v4/letter/b/a6a055/32.png) [@Bhavani90](https://discuss.elastic.co/u/Bhavani90)\
**Post date:** [December 11, 2023, 5:23am UTC](https://discuss.elastic.co/t/create-a-rule-for-stopped-log-alert/349009/1 "2023-12-11T05:23:14Z")

</div>

Hi,  
I'm trying to set up an alert for when my application logs haven't been updated in 1 hour. Could you please share the relevant query?

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [December 12, 2023, 11:21am UTC](https://discuss.elastic.co/t/create-a-rule-for-stopped-log-alert/349009/2 "2023-12-12T11:21:29Z")

</div>

Hi @Bhavani90,

Welcome to the community! Are your application logs going into a single index or are they included with other application logs in an index?

You could check that the number of documents in the index is 0 for the last hour. There is a similar example in the [Elasticsearch query alert documentation](https://www.elastic.co/guide/en/kibana/current/rule-type-es-query.html) that can help you get started.

Hope that helps!

---

<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:** [January 9, 2024, 11:22am UTC](https://discuss.elastic.co/t/create-a-rule-for-stopped-log-alert/349009/3 "2024-01-09T11:22:16Z")

</div>

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