# Service threshold over period of time (e.g. server response over 1 second for 5 minutes)

**URL:** <https://community.dynatrace.com/t/service-threshold-over-period-of-time-e-g-server-response-over-1-second-for-5-minutes/56607>\
**Category:** Alerting\
**Tags:** problem-detection, problem-notification, problems\
**Created:** [July 30, 2026, 10:39pm UTC](https://community.dynatrace.com/t/service-threshold-over-period-of-time-e-g-server-response-over-1-second-for-5-minutes/56607 "2026-07-30T22:39:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cambuchi](https://avatars.discourse-cdn.com/v4/letter/c/ecb155/32.png) [@cambuchi](https://community.dynatrace.com/u/cambuchi)\
**Post date:** [July 30, 2026, 10:39pm UTC](https://community.dynatrace.com/t/service-threshold-over-period-of-time-e-g-server-response-over-1-second-for-5-minutes/56607/1 "2026-07-30T22:39:05Z")

</div>

From the alert settings I’m able to create an alert query that charts server response times for a service. Currently that is set to alert when the threshold goes over 1 second. However, we want to ignore occasional blips so we want it to send an alert when it has been over 1 second for 5 minutes. I tried adding a “from:-5m” to my timeseries query but the query was not accepted by the alerting service and notified me that “from” and “to” were not allowed.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [July 31, 2026, 12:05am UTC](https://community.dynatrace.com/t/service-threshold-over-period-of-time-e-g-server-response-over-1-second-for-5-minutes/56607/2 "2026-07-31T00:05:37Z")

</div>

Hey Cambuchi,

While creating a custom anomaly detector there are 2 modes, simple and advanced. If you switch to advanced mode you’ll find settings for changing the violating samples as well as changing the size of the sliding window used for evaluation. Changing the violating samples to 5 would make it so the threshold has to be breached for 5 minutes to alert.

You can read more about sliding windows and evaluation in the docs here&nbsp;[Anomaly detection configuration — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/anomaly-detection-configuration#sliding-window)

Hope this helps!
