the checkmk agent should be able to automatically add and remove the Host in check downtime by the availability of a specific file on the monitored Host.
When this file is present, the host is in downtime.
When this file is not present, the host is not in downtime.
Checkmk Downtime can already be set in the UI and also via API.
But for scripts which are already running on the hosts creating/removing a file would be easier than using the API…