# Alert not being triggered for Uptime duration anomaly rule

**URL:** https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639
**Category:** Elastic Observability
**Created:** [April 30, 2022, 5:23am UTC](https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639 "2022-04-30T05:23:00Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Mehakdeep\_singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehakdeep_singh/32/103716_2.png) [@Mehakdeep\_singh](https://discuss.elastic.co/u/Mehakdeep_singh)
#### Post date: [April 30, 2022, 5:23am UTC](https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639/1 "2022-04-30T05:23:00Z")

</div>

Hey guys,  
I'm trying to trigger alerts for uptime duration anomaly using the webhook connector. Although I see the anomaly for the monitor as shown in the screenshot below, but no alert rule is triggered.  
I have configured the alert rule and webhook properly. Could you please suggest how could I resolve this ? Also could you suggest some endpoint/website that I could monitor which could provide me with an anomaly of critical severity.

 ![Screenshot 2022-04-30 at 10.48.57 AM](https://us1.discourse-cdn.com/elastic/original/3X/0/1/01cf4fb9d9c4027618815897b9acc7fc11f221e2.png)

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [April 30, 2022, 2:55pm UTC](https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639/2 "2022-04-30T14:55:13Z")

</div>

Can you please confirm the following:

1. The Sample frequency of your uptime monitor (for example, in heartbeat.yml here it shows 60s):

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

1. The Sample frequency of your Anomaly Alert configuration:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/8/0881d4ce476e2cd31a021dcd325a66fbc55f279d.png)

1. The bucket\_span of the ML job that was created for you:

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

1. The version of the Elastic Stack you are using

Also, note that I'm using the URL `http://httpstat.us/200?sleep=50` to monitor. I'm sure if I collect several days of data on this URL (to get ML to learn the typical response time of this URL) and then switch the heartbeat.yml configuration to query `http://httpstat.us/200?sleep=10000`, it should result in a critical anomaly in that the response time will be more than 10 seconds whereas it was typically under 100ms.

---

<div class="post-metadata">

### Author: ![Mehakdeep\_singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehakdeep_singh/32/103716_2.png) [@Mehakdeep\_singh](https://discuss.elastic.co/u/Mehakdeep_singh)
#### Post date: [May 1, 2022, 2:06pm UTC](https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639/3 "2022-05-01T14:06:57Z")

</div>

> [@richcollier](#):
>
> [http://httpstat.us/200?sleep=50](http://httpstat.us/200?sleep=50)

Hi Rich,

Actually I'm using Elastic synthetics integration (using elastic agent). While configuring the integration I set monitor interval to 60 sec. And while configuring the alert I set sample frequency to 1 minute. Also the bucket span is 15m. The deployment version is 7.16.2. Also, on some jobs I see this warning - "Datafeed has been retrieving no data for a while".

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [May 2, 2022, 4:35pm UTC](https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639/4 "2022-05-02T16:35:16Z")

</div>

> [@Mehakdeep\_singh](#):
>
> Also, on some jobs I see this warning - "Datafeed has been retrieving no data for a while".

Are you potentially testing the synthetics agent on a laptop that occasionally sleeps?

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [May 2, 2022, 9:22pm UTC](https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639/5 "2022-05-02T21:22:23Z")

</div>

I think there may also be a bug here as to why the alert is not firing. Researching now. Will update when I know more.

---

<div class="post-metadata">

### Author: ![Mehakdeep\_singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehakdeep_singh/32/103716_2.png) [@Mehakdeep\_singh](https://discuss.elastic.co/u/Mehakdeep_singh)
#### Post date: [May 3, 2022, 4:24pm UTC](https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639/6 "2022-05-03T16:24:30Z")

</div>

Sure Rich.

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [May 4, 2022, 3:53pm UTC](https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639/7 "2022-05-04T15:53:54Z")

</div>

It is true - there is a bug with the default alert logic if that alert is created from the Uptime UI. However, if you instead create the alert from the ML UI for the job that the Uptime app creates, then the alert works properly.

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

Alert example result:

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

---

<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 4, 2022, 8:35am UTC](https://discuss.elastic.co/t/alert-not-being-triggered-for-uptime-duration-anomaly-rule/303639/8 "2022-11-04T08:35:21Z")

</div>


