25 Jul 2025
08:15 PM
- last edited on
29 Jul 2025
08:32 AM
by
MaciejNeumann
Is there an efficient way to retrieve specific metrics (ie process usage and memory) from a process of a host (process group instance) with Dynatrace API? where the parameter would be the specific ID.
Thank you.
Solved! Go to Solution.
25 Jul 2025 10:21 PM
Sure, there is Metrics API for classic metrics where you can use metric selector (the same one used in Data Explorer). (Dynatrace Managed and Dynatrace SaaS platform)
For Grail Metrics (Dynatrace SaaS platform), you can use the Gral Query API with DQL.
Can you share some more details what you are trying to achieve?
28 Jul 2025 04:33 PM
hi Julius, sorry for the late response. I am looking for a way to get specific metrics from a process group instance (process memory and cpu usage in the picture) given a process group instance ID and a host ID. I m unsure how I should use the API to target a specific process group.
Thank you
29 Jul 2025 06:27 AM
Hi @tylerv
For any metric you see in dynatrace UI you can use the create metric event from the ...
Here is a cpu metric example:
In the metric event look for the metric selector
You can see it include with in the filter the process group instance id
Now just copy the metric selector and paste it in with in the metric/query api
And you are done
HTH
Yos
29 Jul 2025 07:44 AM
The Metric API has also a separate parameter for entity selector, so you might want to use that instead of adding :filter to your metric selector.