From c688a94f8a12ed6d3bdcf664a1f7f75aa02c23ba Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Sat, 25 Jun 2016 17:32:12 +0200 Subject: [PATCH] API: Add missing downtime_depth attribute fixes #12041 --- doc/6-object-types.md | 2 ++ lib/icinga/checkable.hpp | 2 +- lib/icinga/checkable.ti | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) 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 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 {{{