- class spicerack.alerting.AlertingHosts(alertmanager_hosts: AlertmanagerHosts, icinga_hosts: IcingaHosts)¶
Operate on Alertmanager and Icinga via their APIs.
Initialize the instance.
- downtime(reason: Reason, *, duration: timedelta = datetime.timedelta(seconds=14400)) str ¶
Issue a new downtime.
the downtime ID.
- Return type
- downtimed(reason: Reason, *, duration: timedelta = datetime.timedelta(seconds=14400), remove_on_error: bool = False) Iterator[None] ¶
Context manager to perform actions while the hosts are downtimed on Alertmanager and Icinga.
None -- it just yields control to the caller once Alertmanager and Icinga have received the downtime and deletes the downtime once getting back the control.