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

How can we get metrics related to a particular application using an API?

r786khanna
Newcomer

Hi

Is there any API with which I can fetch all the metrics like CPU, Memory etc. for a particular application or any service which is being monitored by dynatrace ?

6 REPLIES 6

JamesKitson
Dynatrace Guru
Dynatrace Guru

Yes, anything that you can include in a custom chart can be polled through the metrics API:

https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/

r786khanna
Newcomer

Thanks for your quick response


But i need some more info on this
Suppose i created a custom chart and pinned that to dashboard
now can you please suggest me how to fetch the data from that chart using API

how can i create a metrics API for that chart?

You don't pull data from charts, using the API you are accessing the same underlying datastore that the custom charts themselves use.

Okay

Can you please guide me from where i can create the APIs which can fetch the data from datastore (datastore used by custom chart).

The API I linked initially is the 'interface' that you interact with to pull that data out of Dynatrace.

https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/

You create an API token (in the settings > integration > Dynatrace API) and then you use that token to query the API which is described in the link above. All you would need to get started is described in the main page for the API (e.g. authentication) and it described how to try things out using the API explorer.

https://www.dynatrace.com/support/help/dynatrace-api/

Thanks for guiding, James.

Featured Posts