We would like to understand the process for saving the availability report in CSV format in Checkmk and storing the generated CSV file on disk automatically.
Could you please suggest if this can be achieved through an API or any other supported method/process in Checkmk?
You can apply all the needed parameters and use the URL to get the data on demand. You can also use the URL the export the data using CSV format and query whenever needed.
However, I am not fully understanding how this can be achieved. Could you please provide more detailed steps or an example process for implementing this?
When we call the URl with curl on linux , we get the output as below where percentage value is showing as n/a;the result is not as we view when we export the file from UI.
The command is working, but when executed from the Linux command line, it shows all availability values and the summary as 100%. However, when we check the availability report through the browser, the report shows different values (for example, the summary shows 99.12%).
It appears that the availability calculation is not being reflected correctly when the report is called from the Linux command line.
Perfect, you now need to adjust the computation parameters according to your needs. You can do that using any web browser to collect all the parameters available in the URL. Each parameters is going to modify the URL adding or modifying parameters.
How can we change dynamically the Time Range using the curl URL? Currently, we are using the custom-> view , and the Time Range can only be changed through the “Change Display Options” section in the availability report.
Each time range has a number, most of them are related to fixed periods while others allow the inclusion of additional parameters. After doing a change in the parameters please check the generated url for differences.
The URL will have all parameters and will look like this:
FQDN/SITENAME/check_mk/check_mk/view.py?_csrf_token=4d6c10ec-78b3-4388-8e94-94133ea23048&filled_in=avoptions_display&_transid=1778590242%2F3vXMqhD8fus&avoptions=set&apply=Apply&avo_rangespec_sel=5&avo_rangespec_16_days=0&avo_rangespec_16_hours=0&avo_rangespec_16_minutes=0&avo_rangespec_16_seconds=0&avo_rangespec_17_0_year=2026&avo_rangespec_17_0_month=5&avo_rangespec_17_0_day=12&avo_rangespec_17_1_year=2026&avo_rangespec_17_1_month=5&avo_rangespec_17_1_day=12&avo_labelling=1&avo_av_levels_value_0=99.0&avo_av_levels_value_1=95.0&avo_outage_statistics_0=1&avo_outage_statistics_1=1&avo_timeformat_0=c4e12aa4e018b4d2a2942a7bc7f250c5dd49b55e361c8843a9c6612393c3bad5&avo_timeformat_1=a4223a433eb3597d6ccb9fcd7a67b600fdf8d303965ee6ebdb92b86f324d0045&avo_timeformat_2=c79ce24dccedc25c4bb147dc9fa76a5ff89fd5d76aada1c28494c1e63c63f228&avo_grouping=dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91&avo_dateformat=881e08f81c4190714d51ec7b5d16992a0cb6b6012149a98e7c7356b901952cbf&avo_summary=0e04b5ba903e6b68f52e38e4ca1c40ce2a9fc04e1ff36133e35499378ac4b7f7&host=HOST&mode=availability&site=checkmk&view_name=hoststatus
With that you can find which parameters are being used and apply the conditions that satisfy what you need. Unfortunately I was not able to find documentation or API details to collect this details in a better way.