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

API : Get detailed CPU consumption ?

peverard
Participant

Hi,

Is it possible to get the CPU consumption detail for a process with the API ?

For example, the "Garbage collection CPU" :

I saw those metric relative to garbage collection or to CPU usage :

- com.dynatrace.builtin:pgi.jvm.garbagecollectioncount;Garbage collection count;
- com.dynatrace.builtin:pgi.jvm.garbagecollectiontime;Garbage collection time;
- com.dynatrace.builtin:pgi.go.gc_collection_count;Garbage collector invocation count;
- com.dynatrace.builtin:pgi.suspension;Garbage collection suspension time;

- com.dynatrace.builtin:host.cpu.iowait;CPU IO wait
- ruxit.python.heartbeat:cpu_system;cpu_system
- com.dynatrace.builtin:host.cpu.other;CPU other
- ruxit.python.heartbeat:cpu_user;cpu_user
- ruxit.python.heartbeat:cpu_idle;cpu_idle
- com.dynatrace.builtin:docker.container.cpu;Docker: CPU usage
- com.dynatrace.builtin:host.cpu.steal;CPU steal
- com.dynatrace.builtin:host.cpu.user;CPU user
- com.dynatrace.builtin:pgi.cpu.usage;Process CPU Usage
- com.dynatrace.builtin:aws.ec2.instance.cpu.usage;EC2 CPU Usage %
- com.dynatrace.builtin:aws.rds.cpu.usage;RDS CPU Usage %
- com.dynatrace.builtin:host.cpu.system;CPU system
- com.dynatrace.builtin:host.cpu.idle;CPU idle

Thanks,

Regards.

Pierrick EVERARD.

 

1 REPLY 1

jonathan_schull
Dynatrace Advisor
Dynatrace Advisor

Hi Pierrick,

I think it would be good for you to look into the newer Metrics API as this provides much more metrics and they are easier to work with through the API. In relation to the question asked, here are the generic process cpu metrics made available through the Metrics API:

builtin:tech.generic.cpu.groupSuspensionTime
builtin:tech.generic.cpu.groupTotalTime
builtin:tech.generic.cpu.suspensionTime
builtin:tech.generic.cpu.totalTime
builtin:tech.generic.cpu.usage

You can read more about the Metrics API through these links:
Blog: https://www.dynatrace.com/news/blog/integrate-dynatrace-more-easily-using-the-new-metrics-rest-api/
Documentation: https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/environment-api/metric-v2/

Cheers,
Jonathan


Featured Posts