Nagios XI API : Host Status (UP Duration)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hixavier
Posts: 12
Joined: Tue Jul 30, 2019 6:57 am

Nagios XI API : Host Status (UP Duration)

Post by hixavier »

Hello,

Using the Nagios XI API, is it possible to get the amount of time a host has been UP(Duration)? For example, in the GUI, on the left hand side, if you click on `Host Status`, you can see a list of your hosts with the following columns: Status, Duration, Attempt, Last Check, Status Information. Is it possible to get this information using the Nagios XI API?

Thanks :)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI API : Host Status (UP Duration)

Post by scottwilkerson »

It isn't directly available but you could calculate it off of the last_state_change value in the API for the hoststatus.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked