[icinga-checkins] icinga.org: icinga2/master: API: Add missing downtime_depth attribute

git at icinga.org git at icinga.org
Sat Jun 25 17:32:36 CEST 2016


Module: icinga2
Branch: master
Commit: c688a94f8a12ed6d3bdcf664a1f7f75aa02c23ba
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=c688a94f8a12ed6d3bdcf664a1f7f75aa02c23ba

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Sat Jun 25 17:32:12 2016 +0200

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 e18fe06..6f414ef 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 89dcefe..eef0208 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 e909af6..27a158d 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 {{{



More information about the icinga-checkins mailing list