# Extensions 2.0 alert mapping

**URL:** <https://community.dynatrace.com/t/extensions-2-0-alert-mapping/45068>\
**Category:** Extensions\
**Tags:** extensions\
**Created:** [April 9, 2024, 8:30pm UTC](https://community.dynatrace.com/t/extensions-2-0-alert-mapping/45068 "2024-04-09T20:30:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benji\_Dynatrace](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@Benji\_Dynatrace](https://community.dynatrace.com/u/Benji_Dynatrace)\
**Post date:** [April 9, 2024, 8:30pm UTC](https://community.dynatrace.com/t/extensions-2-0-alert-mapping/45068/1 "2024-04-09T20:30:51Z")

</div>

Hi,

So I am working on an extension that sends an alert based on the result of a powershell script. Now, if I wanted to create object/classes and then bind the alert to those, how would I go about doing that? For example, I run a powershell script that checks something on an sql server, is there a way to identify that sql server that isn’t through the entity selector?

Thanks,

Benji\_Dynatrace

---

<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:** [April 10, 2024, 9:19am UTC](https://community.dynatrace.com/t/extensions-2-0-alert-mapping/45068/2 "2024-04-10T09:19:43Z")

</div>

Hi,

If you use [metric scripting integration](https://docs.dynatrace.com/docs/shortlink/pipe-metric-ingestion) it is comes with OneAgent, already pointing to your host.

Best regards

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [April 10, 2024, 9:50am UTC](https://community.dynatrace.com/t/extensions-2-0-alert-mapping/45068/3 "2024-04-10T09:50:56Z")

</div>

You can use metric line enrichment for this.

Option 1: If you know the process id of the process and you add, for example,&nbsp;`dt.process.pid=12345` to the metric line it will automatically be exchanged for `dt.entity.process_group_instance=PROCESS_GROUP_INSTANCE-D337020E5CAE4F0F,dt.entity.process_group=PROCESS_GROUP-D337020E5CAE4F0D`.

Option 2: If you know the tech rule of the process ([Process group detection — Dynatrace Docs](https://docs.dynatrace.com/docs/platform-modules/infrastructure-monitoring/process-groups/configuration/pg-detection)) and you add, for example,&nbsp;`dt.techrule.id=zoomtech` as a dimension, it will automatically be exchanged for the above entity dimensions.
