# How to query which alerting profiles are associated with a Dynatrace entity?

**URL:** <https://community.dynatrace.com/t/how-to-query-which-alerting-profiles-are-associated-with-a-dynatrace-entity/53301>\
**Category:** Alerting\
**Tags:** alerting-profile\
**Created:** [September 11, 2025, 1:33am UTC](https://community.dynatrace.com/t/how-to-query-which-alerting-profiles-are-associated-with-a-dynatrace-entity/53301 "2025-09-11T01:33:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![satish\_a\_prasad](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@satish\_a\_prasad](https://community.dynatrace.com/u/satish_a_prasad)\
**Post date:** [September 11, 2025, 1:33am UTC](https://community.dynatrace.com/t/how-to-query-which-alerting-profiles-are-associated-with-a-dynatrace-entity/53301/1 "2025-09-11T01:33:19Z")

</div>

Hopefully this feature is hiding somewhere 🙂

we have a tenant with a gazillion hosts and services. i need to quickly inventory which alerting profiles are mapped to specific hosts or services. I’m hoping i don’t have to sit and open every single alerting profile to determine whether my specific host/service is mapped into it.

I know one workaround is that if a Problem was recently detected on that host/service, then the Problems view has an “alerting profile” column to help with the mapping.  
But what if it’s a super healthy host/service that hasn’t seen any problems recently?

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 11, 2025, 2:18am UTC](https://community.dynatrace.com/t/how-to-query-which-alerting-profiles-are-associated-with-a-dynatrace-entity/53301/2 "2025-09-11T02:18:31Z")

</div>

[@satish\_a\_prasad](https://community.dynatrace.com/user/63)&nbsp;From what I understand alerting profiles in Dynatrace are associated with events and not the entities. They are set to&nbsp;filter and manage problem notifications and are&nbsp;applied at the problem level, not at the individual entity level.

So, the alerting profiles may not actually show up against hosts or services unless we have some smart tagging configured to set alert profile name as a tag on the entity or use the tag set on the entity as a alert profile name as a reference

---

<div class="post-metadata">

**Author:** ![michiel\_otten](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/michiel_otten/32/21987_2.png) [@michiel\_otten](https://community.dynatrace.com/u/michiel_otten)\
**Post date:** [November 4, 2025, 10:46pm UTC](https://community.dynatrace.com/t/how-to-query-which-alerting-profiles-are-associated-with-a-dynatrace-entity/53301/3 "2025-11-04T22:46:03Z")

</div>

This is correct.&nbsp; Alerting profiles relate to events. Therefore you can start with querying the events related to an alerting profile.&nbsp; When doing this via DQL (fetch events), you can add the affected entities. Now you have the entities. This should enable you to match each alerting profile to entities.

---

<div class="post-metadata">

**Author:** ![t\_pawlak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/t_pawlak/32/14991_2.png) [@t\_pawlak](https://community.dynatrace.com/u/t_pawlak)\
**Post date:** [November 7, 2025, 2:55pm UTC](https://community.dynatrace.com/t/how-to-query-which-alerting-profiles-are-associated-with-a-dynatrace-entity/53301/4 "2025-11-07T14:55:39Z")

</div>

Hi,  
Here’s how I approached it.

I checked which fields are available on DAVIS\_PROBLEM events to see how I could link problems to an alerting profile and the impacted entities:

```markup
fetch events
| filter event.kind == "DAVIS_PROBLEM"
| limit 1

```

From this inspection I noticed the label labels.alerting\_profile.

 ![t_pawlak_0-1762527153790.png](https://global.discourse-cdn.com/dynatrace/original/2X/9/997a00c5c6dfc95a3dea364e9ab8678c86556a60.png)

So as&nbsp;[@michiel\_otten](https://community.dynatrace.com/user/4669)&nbsp;and&nbsp;[@p\_devulapalli](https://community.dynatrace.com/user/21657)&nbsp; wrote, I mapping alerting profile with entities and counted problems:

```markup
fetch events
| filter event.kind == "DAVIS_PROBLEM" AND event.status_transition == "CREATED"
| fieldsAdd ap = coalesce(
    labels.alerting_profile,
    labels.alertingProfile,
    labels.alertingprofile
)
| filter isNotNull(ap)
| expand ae = affectedEntities
| summarize problems = count(), by: {
  alerting_profile = ap,
  entityType = ae.entityType,
  entityId = ae.entityId,
  entityName = ae.displayName
}
| sort alerting_profile asc, problems desc

```

 ![t_pawlak_1-1762527223656.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/d/2da81a64449f65c266251d62c1b3f98c6f55bb91.png)

If you don’t want the results aggregated, just remove the summarize step and keep the expanded rows.

 ![t_pawlak_2-1762527263656.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/1/9164b4e20b9b2b66b9aaaae8302c583befad954e.png)
