11 Mar 2018
01:00 PM
- last edited on
24 May 2021
03:15 PM
by
MaciejNeumann
Hi,
In our environment, we have a requirement to extract the Host last reboot time from AppMon, as well as Dynatrace (Managed). I have been able to do so via a REST API call for AppMon, but Dynatrace Managed appears to be more challenging.
In Managed, I see in the GUI that the Uptime is recorded when looking at the Host details, but this is very vague (e.g. Uptime: over 183 days). My next thought was to consider pulling the availability metrics for a process (*NIX: systemd process, Windows: System process) as this does provide a specific time in the GUI as to when the last downtime occurred (e.g. 5 h 18 min
total downtime Last downtime on 21-02-2018 07:24 - 07:25).
Is there a way that one can retrieve this via a REST API call? Has anyone done this before?
Solved! Go to Solution.
You can pull the host availability metric from the Dynatrace REST API:
com.dynatrace.builtin:host.availability
https://www.dynatrace.com/support/help/dynatrace-api/timeseries/how-do-i-fetch-the-metrics-of-monitored-entities/#available-timeseries
Here is a good example of a HTML process and host availability report fetched by API that calculates the same numbers as our Web UI shows:
https://github.com/Dynatrace/dynatrace-api/tree/ma...
Best,
Wolfgang
Thanks Wolfgang, I will try this.
Hello
Please could you help to build something as shown in the git hub (from scratch please)?
How Can I have a view like bellow with simply API
Yes we will add it pretty soon.
is it added in api v2?
not so far but we will not forget about that
Any updates on this?
I've been looking for this one, but I can't find it in v2. Is this implemented? I really need this information.