Check MK web API (http url) to retrieve availability status data for all hosts

I’m trying to pull some availability status via the Web-API. Specifically, if I go to ‘All Hosts’ -> ‘Availability’ and configure my options in the web UI to limit to a one week duration,
I would like to be able to do this programmatically so I can get average uptime on a weekly basis. Is this functionality available in the Web-API? If so, how I can achieve this?
Could you please provide any sample web api url to fetch ‘Availability’ data.
Regards,
Vilas Patil

If you build your availability table, it is possible to use the “URL to this frame” and add an “&output_format=csv_export”.
Inside this URL are all parameters you defined before.

Hi Andreas,
Thank you for your quick response.
I want to create REST web api to get the Availability table data in json format. Could you kindly help to achieve this.
Best Regards,
Vilas Patil

Short answer. It is not possible at the moment.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.