# Advice on alerting if CPU suddenly significantly goes and stays above normal baseline but under alerting threshold

**URL:** <https://community.dynatrace.com/t/advice-on-alerting-if-cpu-suddenly-significantly-goes-and-stays-above-normal-baseline-but-under-alerting-threshold/53076>\
**Category:** Alerting\
**Created:** [August 22, 2025, 12:38pm UTC](https://community.dynatrace.com/t/advice-on-alerting-if-cpu-suddenly-significantly-goes-and-stays-above-normal-baseline-but-under-alerting-threshold/53076 "2025-08-22T12:38:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JordanGreen](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@JordanGreen](https://community.dynatrace.com/u/JordanGreen)\
**Post date:** [August 22, 2025, 12:38pm UTC](https://community.dynatrace.com/t/advice-on-alerting-if-cpu-suddenly-significantly-goes-and-stays-above-normal-baseline-but-under-alerting-threshold/53076/1 "2025-08-22T12:38:04Z")

</div>

Hi

On a few of our hosts the CPU usuage spiked significantly and stayed at that not normal level for few days as per below. I just wondered Is there a way to detect a sudden increase in CPU above our normal baseline. We didnt get an alert as it didnt hit our 95% threshold but we would like to be notified in sudden significant change of CPU say an increase of 20/30% for a period of time. Just wondered does any recommendation on best way to do this?

 ![JordanGreen_0-1755865814289.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/1/51f917e6efbe58040b2dbb6d90881044dab20639.png)

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [August 23, 2025, 9:36pm UTC](https://community.dynatrace.com/t/advice-on-alerting-if-cpu-suddenly-significantly-goes-and-stays-above-normal-baseline-but-under-alerting-threshold/53076/2 "2025-08-23T21:36:37Z")

</div>

Hi&nbsp;[@JordanGreen](https://community.dynatrace.com/user/50251)

[Auto-adaptive thresholds for anomaly detection — Dynatrace Docs](https://docs.dynatrace.com/docs/discover-dynatrace/platform/davis-ai/anomaly-detection/concepts/auto-adaptive-threshold)

In Managed you can play with auto-adaptive baseline (+signal fluctuation and duaration) metric event at Anomaly detection with this metric expression:

builtin:host.cpu.usage:splitBy(“dt.entity.host”).

 ![Mizs_0-1755982681417.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/e/5e36b5e67884a591ed76d7e817080172a3b39ef6.png)

In Saas you can use Davis Anomaly Detection from a Notebook (also play with fluctuation and duration):

 ![Mizs_1-1755982876896.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/a/0a32dba20aecf7d7cdf331429c5f69789a73a839.png)

 ![Mizs_2-1755982943241.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/4/c48a4ef97842f420fdf2d0e86b90ba1e051bdd8d.png)

Based on my experience these CPU patterns related only one process: eg. antivirus, compression or java process gc suspension…so you can try monitor process cpu usage with parents transformation (for host infromation):

Managed metric expression:

builtin:tech.generic.cpu.usage:parents:splitBy(“dt.entity.process\_group\_instance”,“dt.entity.host”)

SaaS DQL:

timeseries usage = avg(dt.process.cpu.usage), by: { dt.entity.process\_group\_instance, dt.entity.host }  
| fieldsAdd entityName(dt.entity.process\_group\_instance), entityName(dt.entity.host)

I would have another idea for metric expression and DQL, you can try this also.

Metric expression:

(builtin:host.cpu.usage:splitBy(“dt.entity.host”):avg:sort(value(auto,descending)):rollup(avg,15m))-(builtin:host.cpu.usage:splitBy(“dt.entity.host”):avg:sort(value(auto,descending)):rollup(avg,15m):timeshift(-1h))

DQL:

timeseries usage = avg(dt.host.cpu.usage), by: { dt.entity.host }  
| fieldsAdd usage = arrayMovingAvg(usage, 15)  
| sort arraySum(usage) desc  
| join [ timeseries usage = avg(dt.host.cpu.usage), by: { dt.entity.host }, shift: -1h  
| fieldsAdd usage = arrayMovingAvg(usage, 15)  
| sort arraySum(usage) desc ], on: { dt.entity.host }, fields: { operand = usage }  
| fieldsAdd expression = usage[] - operand[]  
| fieldsRemove usage, operand  
| fieldsAdd entityName(dt.entity.host)

 ![Mizs_3-1755984922710.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/9/59912e9d98eed8b3219be74b6dd4e696b955fd1c.png)

Long positive “hills” can be a good trigger of problem creation.

I hope it helps.

Best regards,

János
