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

How to retrieve Host Availability metrics via REST API

AmitChiba
Helper

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?

10 REPLIES 10

wolfgang_beer
Dynatrace Leader
Dynatrace Leader

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.

Malaik
DynaMight Champion
DynaMight Champion

Hi @AmitChiba 

Did you make it?

 

Sharing Knowledge

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

Malaik_1-1624456323761.png

 

Sharing Knowledge

jeppe_lindberg3
Participant

@Wolfgang B. will process and host availability be added to the api v2 soon?


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?

Dynatrace Certified Master - Dynatrace Partner - 360Performance.net

MichaelL
Observer

I've been looking for this one, but I can't find it in v2. Is this implemented? I really need this information.

Featured Posts