23 Jul 2020 12:43 PM - last edited on 10 Jun 2021 12:09 PM by MaciejNeumann
Hi,
Does dynatrace have an api to extract cpu usage and ram usage details for all hosts for last 2 months? We would like to use curl to fetch the data.
We are on version 1.188.104.20200323-145140.
Solved! Go to Solution.
23 Jul 2020 01:51 PM - last edited on 27 Mar 2023 10:14 AM by MaciejNeumann
Hi Vikas,
Take a look in https://xXxXxXx.live.dynatrace.com/rest-api-doc/index.jsp?urls.primaryName=Environment%20API%20v1#/ for the API page (replacing the x’s with your tenant ID). This is an interact-able page to build the API calls you would be interested in; I would focus in on timeseries section. Also, once you have built your API calls, you can make it into a fully formed URL and take advantage of the “from web” data option in excel to automatically pull your information and format it into an excel chart
Thanks,
Michael Oxendine
23 Jul 2020 01:58 PM
I have done this many times myself and found it to work wonders. You can also download a json each time and import it into Excel but that inquires a bit more manual work.
23 Jul 2020 03:35 PM
Hi @Michael O.
That's is really great way to utilize dynatrace rest api.
The only question I do have here is if you managed to utilize the v2 metric with csv output? I didn't succeed to create the accept-type to be send as a url query parameter
Yos
28 Jan 2021 08:29 PM
I am working on a similar report using the Metrics API. We have had some luck with building the API request, but I'm curious if there's a way to extract the request URL or if someone has knowledge to what the API request is for the XLS export from a dashboard. The XLS report download shows all data points for the time frame. How would you condense the data points down to one (as shown in the snippet)? The report request I have is to have Max CPU and Max Memory for a specific time period. I'm guessing the one number is an average of all the data points. Can this be built into the request?