Well, if we are already using the REST API, why don’t we dynamically create the hostgroup from the list of hosts as well? The API has the necessary endpoints.
So
- Step 1: Create host group from list of hosts
- Step 2: Set the host group into downtime
Should work, shouldn’t it?