cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dynatrace V2 API - Possible to get the Process Table with CPU and Memory from API?

louis_gallo
Helper

Is it possible to get the process table for a host with per process CPU and wssMB/rss memory via the DT V2 API?

 

Thanks,

 

Lou

 

 

2 REPLIES 2

Radu
Dynatrace Pro
Dynatrace Pro

Hi Lou,

 

Not directly. But there are some transformations that can be added to the metric selector to allow for that filtering.

  • :parents - brings into the dimension section the parent dimension of the metric's original dimension. For example, if the metric is normally collected per Process, it will bring in the Host into the dimensions
  • :filter - allows to filter out results that don't match this condition. Here we can use it to only retain the data for processeses on a single host

So, for CPU usage per process, only for processes on Host with id HOST-xxxxxxxxxxxx, the metric selector ends up looking like this: 

  • builtin:tech.generic.cpu.usage:parents:filter(eq(dt.entity.host,"HOST-xxxxxxxxxxxx"))

 

I hope this helps.

 

 

Best regards,

Radu

Sorry it has been awhile for me to get back to this.

 

radu, your solution seems to only give the process group instance items, I am really trying to dump the whole process table as seen in the UI for a host.

 

Any way to do that?

 

Thanks,

 

Lou