# Send alert notifications only on specific custom metric value's changes

**URL:** <https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311>\
**Category:** Alerting\
**Tags:** problem-detection, problem-notification, anomaly-detection, problems\
**Created:** [July 2, 2025, 10:48am UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311 "2025-07-02T10:48:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielbusquets](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/danielbusquets/32/19903_2.png) [@danielbusquets](https://community.dynatrace.com/u/danielbusquets)\
**Post date:** [July 2, 2025, 10:48am UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311/1 "2025-07-02T10:48:38Z")

</div>

Hi!

We’ve set up a custom metric that contains the name of an external entity (API Gateway) and its health status, like this:

0: unhealthy

1: healthy

Example:

 ![Screenshot 2025-07-02 at 12.49.26.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/2/c22f71853f0b8430f205d33ca500fff64007c10d.png)

We are receiveing and ingesting multiple same values over time for a given entity, for example:

**Entity 1** - healthy (value: 1) → everything OK, don’t send notification  
**Entity 2** - healthy (value: 1) → everything OK, don’t send notification  
**Entity 1** - healthy (value: 1) → everything OK, don’t send notification  
**Entity 1** - unhealthy (value: 0) → **send notification as it is unhealthy**  
**Entity 3** - healthy (value: 1) → everything OK, don’t send notification  
**Entity 1** - unhealthy (value: 0) → don’t send any notification because we’ve already did it  
**Entity 1** - healthy (value: 1) → **send a solved problem notification, as it became healthy again**

So, we need to alert only on health status changes:

- from 1 to 0: send new problem notification, and don’t notify any other 0’s received for that particular entity.
- from 0 to 1: send resolved problem notification, and don’t notify any other 1’s received for that particular entity.

The trick here is that the email notification should be sent to the team responsible for that entity, which will be different on each case. Alerting Profile + Problem notifications doesn’t seem to be able to specify variable destinations to send emails. Workflows have, but then I don’t know how to send only emails when health changes and not for every redundant event.

Anyone have some advice in how can we set that up?

\*\*\ ***UPDATE** : Metric events doesn’t seem to provide enough customization for that. Could be Open Pipelines the answer?\*\*\*

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [July 2, 2025, 11:39am UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311/2 "2025-07-02T11:39:35Z")

</div>

Hi,

This can be done using [metric events](https://docs.dynatrace.com/docs/shortlink/metric-events).

Best regards

---

<div class="post-metadata">

**Author:** ![lubrman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/lubrman/32/7353_2.png) [@lubrman](https://community.dynatrace.com/u/lubrman)\
**Post date:** [July 2, 2025, 1:23pm UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311/3 "2025-07-02T13:23:33Z")

</div>

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

After setting up the metric event, you can link our event to the desired alerting profile either by tagging the metric event accordingly, or by using a custom rule within the alerting profile to directly target the problem name you’ve configured.

 ![lubrman_0-1751462571124.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/a/2a84229bb97873766a14f40c62bb58339f06a5b9.png)

 ![lubrman_1-1751462602889.png](https://global.discourse-cdn.com/dynatrace/original/3X/b/d/bdc45db31e0b5aca94bc13ee9612ea01593ee361.png)

---

<div class="post-metadata">

**Author:** ![danielbusquets](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/danielbusquets/32/19903_2.png) [@danielbusquets](https://community.dynatrace.com/u/danielbusquets)\
**Post date:** [July 2, 2025, 1:28pm UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311/4 "2025-07-02T13:28:06Z")

</div>

Hi [@AntonPineiro](https://community.dynatrace.com/user/58682),

I’ve tried Metric Events, but I see no way to have the logic to fit these requirements:

**API GW 1** &nbsp;- healthy event (value: 1) → IGNORE (new event but it is healthy)  
**API GW 2** &nbsp;- healthy event (value: 1) → IGNORE&nbsp;(new event but it is healthy)  
**API GW 1** &nbsp;- healthy event (value: 1) → IGNORE (repeated event!)  
**API GW 1** &nbsp;- unhealthy event (value: 0) → **send notification as it is unhealthy**  
**API GW 3** &nbsp;- healthy event (value: 1) → IGNORE (new event but it is healthy)  
**API GW 1** &nbsp;- unhealthy event (value: 0) → IGNORE (repeated event!)  
**API GW 1** &nbsp;- healthy event (value: 1) → **send a solved problem notification, as it became healthy again**

---

<div class="post-metadata">

**Author:** ![danielbusquets](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/danielbusquets/32/19903_2.png) [@danielbusquets](https://community.dynatrace.com/u/danielbusquets)\
**Post date:** [July 2, 2025, 1:30pm UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311/5 "2025-07-02T13:30:40Z")

</div>

Hi&nbsp;[@lubrman](https://community.dynatrace.com/user/73905)&nbsp;thanks, but the problem is exactly on how to set up the metric event or the alerting mechanism (whether is an Anomaly Detector or a Metric Event, or a Workflow, or whatever way).  
Next steps to link the Alerting Profile are clear.

---

<div class="post-metadata">

**Author:** ![lubrman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/lubrman/32/7353_2.png) [@lubrman](https://community.dynatrace.com/u/lubrman)\
**Post date:** [July 3, 2025, 5:34am UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311/6 "2025-07-03T05:34:23Z")

</div>

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

And a similar format doesn’t work for you when searching in the Data Explorer?  
You can then specifically define the services you want to monitor — you can use the same selector in the metric event as well.

custome.api.gateway.healt.status:filter(and(or(in(“api\_name”,entitySelector(“type(api\_name),entityName.equals(~“ **Entity 1** ~”)”))))):splitBy(“dt.entity.process\_group\_instance”):sort(value(auto,descending))

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [July 3, 2025, 7:00am UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311/7 "2025-07-03T07:00:39Z")

</div>

Hi,

Check sliding window&nbsp;[Anomaly detection configuration — Dynatrace Docs](https://docs.dynatrace.com/docs/shortlink/anomaly-detection-configuration#sliding-window)

Best regards

---

<div class="post-metadata">

**Author:** ![danielbusquets](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/danielbusquets/32/19903_2.png) [@danielbusquets](https://community.dynatrace.com/u/danielbusquets)\
**Post date:** [July 3, 2025, 3:37pm UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311/8 "2025-07-03T15:37:40Z")

</div>

Is not doable. Shortest dealerting sliding window is 3 minute. So the unhealthy API Gateway will take 3 minutes at minimum to close the open problem.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [July 4, 2025, 8:29am UTC](https://community.dynatrace.com/t/send-alert-notifications-only-on-specific-custom-metric-values-changes/52311/9 "2025-07-04T08:29:07Z")

</div>

Hi,

It means, that is how Dynatrace works. If that does not fit your use case, that cannot be done today.

Best regards
