# Set custom event for metric key/selector beyond the maximum 1 hour

**URL:** <https://community.dynatrace.com/t/set-custom-event-for-metric-key-selector-beyond-the-maximum-1-hour/42700>\
**Category:** Alerting\
**Tags:** anomaly-detection, maintenance-window, problems-classic\
**Created:** [November 20, 2023, 8:12am UTC](https://community.dynatrace.com/t/set-custom-event-for-metric-key-selector-beyond-the-maximum-1-hour/42700 "2023-11-20T08:12:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![g\_kat](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/g_kat/32/34573_2.png) [@g\_kat](https://community.dynatrace.com/u/g_kat)\
**Post date:** [November 20, 2023, 8:12am UTC](https://community.dynatrace.com/t/set-custom-event-for-metric-key-selector-beyond-the-maximum-1-hour/42700/1 "2023-11-20T08:12:18Z")

</div>

Hi,

We create a metric selector for a specific metric and we want to setup a custom event if this query exceeds a certain value for more than 2 hours. The maximum sliding window allowed is 1 hour, so we can’t seem to find a way to do this. And this specific issue extrapolates to a more generic one: how can we deal with long-term alerts? Is there any way to change the interval granularity of metric keys/selectors for alerting reasons?

Regards,

George

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [November 21, 2023, 1:40pm UTC](https://community.dynatrace.com/t/set-custom-event-for-metric-key-selector-beyond-the-maximum-1-hour/42700/2 "2023-11-21T13:40:56Z")

</div>

I don’t think there is OOTB via the conventional methods. This would be a great RFE though. You can change your granularity in the data explorer which you could technically post into the metric even with the rate segment. But rate has its limitations. This is some what of a solution to work around the limitations,&nbsp; Still its worth a shot!

 ![ChadTurner_0-1700574045936.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/4/d41983f61fb91dfca4f3894aa9de2f2bcdaa7895.png)
