# Providing host name in metric event based on Process group

**URL:** <https://community.dynatrace.com/t/providing-host-name-in-metric-event-based-on-process-group/50637>\
**Category:** Open Q&A\
**Tags:** process-groups, oneagent\
**Created:** [March 10, 2025, 11:33am UTC](https://community.dynatrace.com/t/providing-host-name-in-metric-event-based-on-process-group/50637 "2025-03-10T11:33:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roeir5](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@Roeir5](https://community.dynatrace.com/u/Roeir5)\
**Post date:** [March 10, 2025, 11:33am UTC](https://community.dynatrace.com/t/providing-host-name-in-metric-event-based-on-process-group/50637/1 "2025-03-10T11:33:50Z")

</div>

Hi all,

I have been working on migrating **ITM situations** into **Dynatrace** , and one of the scenarios involves tracking **process memory consumption** and generating alerts when usage exceeds a defined threshold.

To replicate this alerting mechanism in Dynatrace, I was referred to creating a **metric event**.

I have defined the following **metric selector** for this purpose:

```auto
builtin:tech.generic.mem.workingSetSize:filter(and(or(in("dt.entity.process_group_instance",entitySelector("type(process_group_instance),entityName(~"proc_name~")"))))):splitBy("dt.entity.process_group_instance"):auto

```

This query works as expected for triggering the alert based on process memory usage. However, the **problem notification** generated only includes **Process Group** data, making it difficult to determine which **host** this process is running on.

### Issues I Encountered:

1. I explored the **available dimensions** for the metric and attempted to **modify the event template** , but I couldn’t find a way to attach the **host name** to the event.
2. This is not the first time I’ve encountered this issue—some **metrics in Dynatrace** do not natively include the **host name** as part of the metadata.

### My Questions:

1. **Is there a way to retrieve and include the related host entity for a process in the metric event?** Alternatively, is there another **metric** that provides process memory usage while also including host-level information?
2. **Is there a global approach to associating the host name with every related metric event?** (For example, can this be achieved using **tags** or another built-in Dynatrace mechanism?)

I appreciate any insights or best practices on this.

Thanks in advance,  
Roei

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [March 10, 2025, 11:40am UTC](https://community.dynatrace.com/t/providing-host-name-in-metric-event-based-on-process-group/50637/2 "2025-03-10T11:40:10Z")

</div>

Please take a look on the parents transformation:

> **[Metrics API - Metric selector](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/metric-selector)**
>
> Configure the metric selector for the Metric v2 API.

```javascript
builtin:tech.generic.mem.workingSetSize:filter(and(or(in("dt.entity.process_group_instance",entitySelector("type(process_group_instance),entityName(~"proc_name~")"))))):splitBy("dt.entity.process_group_instance"):auto:parents

```

---

<div class="post-metadata">

**Author:** ![Roeir5](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@Roeir5](https://community.dynatrace.com/u/Roeir5)\
**Post date:** [March 11, 2025, 10:26am UTC](https://community.dynatrace.com/t/providing-host-name-in-metric-event-based-on-process-group/50637/3 "2025-03-11T10:26:52Z")

</div>

Hi,

Thank you very much for the solution !

I have been able to attach the parent transformation host name within the dims map
