- class spicerack.alerting.AlertingHosts(alertmanager_hosts: spicerack.alertmanager.AlertmanagerHosts, icinga_hosts: spicerack.icinga.IcingaHosts)¶
Operate on Alertmanager and Icinga via their APIs.
Initialize the instance.
- downtime(reason: spicerack.administrative.Reason, *, duration: datetime.timedelta = datetime.timedelta(seconds=14400)) str ¶
Issue a new downtime.
the downtime ID.
- Return type
- downtimed(reason: spicerack.administrative.Reason, *, duration: datetime.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.