Checkmk API to get all list of hostnames and services , where services went in critical state during specific time. irrespective of later if those recovered to OK state

is there any API to get the list of hostnames and its services , where services went in critical state during specific duration , even if those recovered later. ?

Lets say i want to get list of hostnames and services during last 1 day where services went in critical state and how long they were in critical state

The REST-API currently does not have the Log data source from livestatus available.

But you can create a view in the GUI and use that to get the data via the Multisite API by adding output_format=json, _username=automation, _secret=XXX to the view.py URL parameters.

1 Like