A way to get metrics from a specific process of a host

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.

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?

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

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

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.