# create an alert for a metric whenever it crosses a monthly threshold

**URL:** <https://community.dynatrace.com/t/create-an-alert-for-a-metric-whenever-it-crosses-a-monthly-threshold/55570>\
**Category:** Alerting\
**Tags:** dql, problems\
**Created:** [April 15, 2026, 2:37am UTC](https://community.dynatrace.com/t/create-an-alert-for-a-metric-whenever-it-crosses-a-monthly-threshold/55570 "2026-04-15T02:37:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ellery](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@Ellery](https://community.dynatrace.com/u/Ellery)\
**Post date:** [April 15, 2026, 2:37am UTC](https://community.dynatrace.com/t/create-an-alert-for-a-metric-whenever-it-crosses-a-monthly-threshold/55570/1 "2026-04-15T02:37:42Z")

</div>

I need to create an alert for a metric to notify me whenever it crosses a monthly threshold.

timeseries total = sum(service.Metric),  
from: now()@M,  
to: now(),  
interval: 24h  
| fieldsAdd deposits\_cumulative=arrayMovingSum(total,60)

 ![Ellery_0-1776220610847.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/75003e64b10dcb490349f289a76bb40706904222.png)

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [April 15, 2026, 6:39am UTC](https://community.dynatrace.com/t/create-an-alert-for-a-metric-whenever-it-crosses-a-monthly-threshold/55570/2 "2026-04-15T06:39:05Z")

</div>

It’s always a hacking job to get anomaly detectors running for large timeframes. You can try overriding the interval field with interval=toDuration(1m), but you will run into different issues.

Two possible workarounds instead of using Anomaly detector:

- Use a (scheduled) workflow, do the DQL there and send notifications or create an event. It won’t be a simple workflow, so take your workflow cost into account.
- Use Site Reliability Guardian for it instead. My recommended solution so far. Schedule it to run using a simple workflow. Have OpenPipeline triggering Davis events (so you have alerts) from the Site reliability guardian result data (bizevents). Check this [thread](https://community.dynatrace.com/post/289063#M2723) where I discussed the same approach.

---

<div class="post-metadata">

**Author:** ![Ellery](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@Ellery](https://community.dynatrace.com/u/Ellery)\
**Post date:** [April 16, 2026, 12:58pm UTC](https://community.dynatrace.com/t/create-an-alert-for-a-metric-whenever-it-crosses-a-monthly-threshold/55570/3 "2026-04-16T12:58:35Z")

</div>

Thanks a lot,

i try with this solutions, i will reply the results.

thanks again
