Toggle Active Checks via API?

Hi all,
in Icingaweb2 we have the switches for activating/de-activating Active Checks, Passive Checks, Notifications and so on.
I would like to toggle these switches via the API. E.g. I want to disable all active service checks of a specific host via a script. Is this possible? I could not find sth. in the API docs about these feature commands.
We don’t have the director installed and are configuring Icinga with config files (if this is important).

Cheers,
Marcus

There’s no dedicated action for this, because you’re modifying objects to accomplish this: Api - Icinga 2

The attrs object should be that for toggling active checks:

{
    "attrs": {
        "enable_active_checks": true
    }
}

The other attributes are enable_passive_checks, enable_notifications, enable_event_handler and enable_flapping.

1 Like

Thanks for the quick response Johannes! Will test it asap.