# Anomaly detection threshold

**URL:** <https://community.dynatrace.com/t/anomaly-detection-threshold/35840>\
**Category:** Alerting\
**Tags:** anomaly-detection\
**Created:** [July 13, 2022, 12:53pm UTC](https://community.dynatrace.com/t/anomaly-detection-threshold/35840 "2022-07-13T12:53:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rudolf\_castelin](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@rudolf\_castelin](https://community.dynatrace.com/u/rudolf_castelin)\
**Post date:** [July 13, 2022, 12:53pm UTC](https://community.dynatrace.com/t/anomaly-detection-threshold/35840/1 "2022-07-13T12:53:25Z")

</div>

Hi

Based on the docs [here](https://www.dynatrace.com/support/help/how-to-use-dynatrace/problem-detection-and-analysis/basic-concepts/problem-lifecycle), say we have&nbsp;configured to use a 5-minute sliding window where 3-minute samples need to violate the threshold to raise an event.

What happens if, the anomaly is detected only twice every 5 mins over1 hour?

1100 - 1105 - failed 2 times  
1105 - 1110 - failed 2 times  
1110 - 1115 - failed 2 times

1155 - 1200&nbsp;- failed 2 times

Will an alert still be created?

Will the AI baseline the service against a threshold, where even if the anomaly is detected few times, every 5 mins, once the error rate for the service crosses the threshold, an alert is generated?

---

<div class="post-metadata">

**Author:** ![mgome](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mgome](https://community.dynatrace.com/u/mgome)\
**Post date:** [July 13, 2022, 4:40pm UTC](https://community.dynatrace.com/t/anomaly-detection-threshold/35840/2 "2022-07-13T16:40:45Z")

</div>

The 5 minute sliding window doesn’t slide in 5 minute increments. &nbsp;It’s a five minute window that slides every minute. &nbsp;The window starts at the first occurrence. &nbsp;The answer to your question depends on where in those time blocks the condition occurs. &nbsp;Using the first two time blocks, if the condition occurs at 1104, the window starts and the window slides to the next minute. &nbsp;Then if there’s a reoccurrence in at 1107 (in window) and 1108 (in window), &nbsp;you would get an alert.

| 1104 | 1105 | 1106 | 1107 | 1108 |
| --- | --- | --- | --- | --- |
| \* | | | \* | \* |

Now if the condition does not re-occur in the 1109 minute the event would resolve because the 1104 event would fall outside the five minute window.
