How to determine current downtime status


(Roland) #1

For a custom check I need to determine if a service is currently within a scheduled downtime. Can I rely on downtime_depth returned from /v1/objects/services? Or do I have to run through results of /v1/objects/downtimes to identify a current active downtime?


(Matthias) #2

I was looking into this myself today and as far as the docs say downtime_depth is the correct way to determine whether a host/service is in a downtime:

https://icinga.com/docs/icinga2/latest/doc/09-object-types/#service

downtime_depth 	Number 	Whether the service has one or more active downtimes.