]> granicus.if.org Git - icinga2/commitdiff
API: Add missing downtime_depth attribute
authorMichael Friedrich <michael.friedrich@netways.de>
Sat, 25 Jun 2016 15:32:12 +0000 (17:32 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Sat, 25 Jun 2016 15:32:12 +0000 (17:32 +0200)
fixes #12041

doc/6-object-types.md
lib/icinga/checkable.hpp
lib/icinga/checkable.ti

index e18fe068a6dbbbebbcfcd82a28fdd3b810cd2588..6f414efb398f92484b163ad5dd4f8897923ffdb4 100644 (file)
@@ -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).
index 89dcefe76f200fa66d80947c41ce4345e11f2d6b..eef0208d499c60b0cb04ac3374b15d8bd9a89316 100644 (file)
@@ -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);
index e909af69239e7f17782460db773f1d82c1ca0f52..27a158da4c6cd49ceba16c3b7274b47d8a1244a3 100644 (file)
@@ -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 {{{