# Alerting on rarely occurring User Session Custom Metrics (uscm)

**URL:** <https://community.dynatrace.com/t/alerting-on-rarely-occurring-user-session-custom-metrics-uscm/44410>\
**Category:** Alerting\
**Tags:** anomaly-detection, user-sessions, problems-classic\
**Created:** [March 4, 2024, 12:00pm UTC](https://community.dynatrace.com/t/alerting-on-rarely-occurring-user-session-custom-metrics-uscm/44410 "2024-03-04T12:00:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![itamarmesa](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@itamarmesa](https://community.dynatrace.com/u/itamarmesa)\
**Post date:** [March 4, 2024, 12:00pm UTC](https://community.dynatrace.com/t/alerting-on-rarely-occurring-user-session-custom-metrics-uscm/44410/1 "2024-03-04T12:00:34Z")

</div>

I have an user session custom metric whose ocurrences are ranging between 0 to 4 /min, so I want to create a metric event around this, however there are a few problems:

Both, the seasonal baseline and auto-adaptive treshold takes 0 as an OK value all the time, and not only for the non working hours, so this would actually not be okay. I can see this to be based on the 99th/min percentile being around 0 all the time (which I guess it’s correct), so, what are my options?

I have thought about modifying the uscm to be grouped to get the last hour/last day ocurrences.

Can you think of any better/more elegant solution?

Thanks.

---

<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:** [March 27, 2024, 1:34pm UTC](https://community.dynatrace.com/t/alerting-on-rarely-occurring-user-session-custom-metrics-uscm/44410/2 "2024-03-27T13:34:40Z")

</div>

Why not set a static range of anything under 4 requests per min are problematic?

---

<div class="post-metadata">

**Author:** ![itamarmesa](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@itamarmesa](https://community.dynatrace.com/u/itamarmesa)\
**Post date:** [March 27, 2024, 2:25pm UTC](https://community.dynatrace.com/t/alerting-on-rarely-occurring-user-session-custom-metrics-uscm/44410/3 "2024-03-27T14:25:29Z")

</div>

I think I ended up using :rollup(avg,15m),

the thing with static range here not being optimal is that temporarely 4 requests / min was not actually a problem, but a “constant” flow of requests for minutes.

---

<div class="post-metadata">

**Author:** ![Gosia\_Murawska](https://avatars.discourse-cdn.com/v4/letter/g/2bfe46/32.png) [@Gosia\_Murawska](https://community.dynatrace.com/u/Gosia_Murawska)\
**Post date:** [August 13, 2024, 10:52am UTC](https://community.dynatrace.com/t/alerting-on-rarely-occurring-user-session-custom-metrics-uscm/44410/4 "2024-08-13T10:52:55Z")

</div>

Hi&nbsp;[@itamarmesa](https://community.dynatrace.com/user/68187)&nbsp;  
Have you managed to solve the problem? It would be great if you shared the solution with the Community users&nbsp;:light\_bulb:
