icinga2client.api.methods module¶
-
class
icinga2client.api.methods.APIMethodsMixin¶ -
acknowledge_problem(object_type, object_filter, comment, expiry=None, sticky=True, notify=True)¶ Acknowledge a host or service problem.
See acknowledge-problem documentation for further information.
Parameters: - object_type (str) – The object type to acknowledge.
Either
HostorService. - object_filter (str) – A filter to apply when acknowledging the problem.
- comment (Comment) – Comment associated with the acknowledgement.
- expiry (str) – A timespec marking the expiry time of the notification, in a valid parsedatetime format.
- sticky (bool) – Whether the notification is sticky. If so, it will only be cleared when the host or service returns to a healthy state, otherwise the ack will be cleared on any state change.
- notify (bool) – Whether to generate any configured notifications associated with the host or service.
- object_type (str) – The object type to acknowledge.
Either
-
remove_acknowledgement(object_type, object_filter)¶ Remove acknowledgements on a host or service.
See remove-acknowledgement documentation for further information.
Parameters:
-
remove_downtime(downtime)¶ Remove a named downtime. See also
remove_downtime_filter.See remove-downtime documentation for further information.
Parameters: downtime (str) – The name of the downtime to remove.
-
remove_downtime_filter(object_type, object_filter)¶ Remove downtimes matching the specified filter. See also
remove_downtime.Parameters:
-
schedule_downtime(object_type, object_filter, start, end, comment, duration=False, trigger_name=None)¶ Schedule downtime for hosts and services.
See schedule-downtime documentation for further information, and downtimes for information about fixed and flexible downtimes.
Parameters: - object_type (str) – The object type to perform the action on.
Either
HostorService. - object_filter (str) – A filter to apply when scheduling the downtime.
- start (str) – A timespec marking the beginning of the downtime, in a valid parsedatetime format.
- end (str) – A timespec marking the end of the downtime, in a valid parsedatetime format.
- comment (Comment) – Comment object associated with the downtime.
- duration (str) – A timespec indicating the maximum duration of the
downtime. This implies a
flexibledowntime. - trigger_name (str) – Sets the trigger for a triggered downtime.
- object_type (str) – The object type to perform the action on.
Either
-