diff --git a/doc/6-object-types.md b/doc/6-object-types.md index e18fe068a..6f414efb3 100644 --- a/doc/6-object-types.md +++ b/doc/6-object-types.md @@ -623,6 +623,7 @@ Runtime Attributes: last\_in\_downtime | Boolean | Whether the host was in a downtime when the last check occurred. acknowledgement | Number | The acknowledgement type (0 = NONE, 1 = NORMAL, 2 = STICKY). acknowledgement_expiry | Number | When the acknowledgement expires (as a UNIX timestamp; 0 = no expiry). + downtime\_depth | Number | Whether the host has one or more active downtimes. flapping_last_change | Number | When the last flapping change occurred (as a UNIX timestamp). flapping | Boolean | Whether the host is flapping between states. state | Number | The current state (0 = UP, 1 = DOWN). @@ -1320,6 +1321,7 @@ Runtime Attributes: last\_in\_downtime | Boolean | Whether the service was in a downtime when the last check occurred. acknowledgement | Number | The acknowledgement type (0 = NONE, 1 = NORMAL, 2 = STICKY). acknowledgement_expiry | Number | When the acknowledgement expires (as a UNIX timestamp; 0 = no expiry). + downtime\_depth | Number | Whether the service has one or more active downtimes. flapping_last_change | Number | When the last flapping change occurred (as a UNIX timestamp). flapping | Boolean | Whether the host is flapping between states. state | Number | The current state (0 = OK, 1 = WARNING, 2 = CRITICAL, 3 = UNKNOWN). diff --git a/lib/icinga/checkable.hpp b/lib/icinga/checkable.hpp index 89dcefe76..eef0208d4 100644 --- a/lib/icinga/checkable.hpp +++ b/lib/icinga/checkable.hpp @@ -124,7 +124,7 @@ public: static boost::signals2::signal<void (const Checkable::Ptr&)> OnEventCommandExecuted; /* Downtimes */ - int GetDowntimeDepth(void) const; + virtual int GetDowntimeDepth(void) const override; void RemoveAllDowntimes(void); void TriggerDowntimes(void); diff --git a/lib/icinga/checkable.ti b/lib/icinga/checkable.ti index e909af692..27a158da4 100644 --- a/lib/icinga/checkable.ti +++ b/lib/icinga/checkable.ti @@ -144,6 +144,9 @@ abstract class Checkable : CustomVarObject [no_storage] Timestamp last_check { get; }; + [no_storage] int downtime_depth { + get; + }; [config, navigation] name(Endpoint) command_endpoint (CommandEndpointRaw) { navigate {{{