09 Apr 2024 09:30 PM - last edited on 10 May 2024 03:16 PM by Michal_Gebacki
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
Solved! Go to Solution.
10 Apr 2024 10:19 AM
Hi,
If you use metric scripting integration it is comes with OneAgent, already pointing to your host.
Best regards
10 Apr 2024 10:50 AM - edited 10 Apr 2024 03:40 PM
You can use metric line enrichment for this.
Option 1: If you know the process id of the process and you add, for example, 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 (https://docs.dynatrace.com/docs/platform-modules/infrastructure-monitoring/process-groups/configurat...) and you add, for example, dt.techrule.id=zoomtech
as a dimension, it will automatically be exchanged for the above entity dimensions.