From: Gunnar Beutner Date: Mon, 1 Jul 2013 12:30:19 +0000 (+0200) Subject: Implement Service::GetFlappingThreshold(). X-Git-Tag: v0.0.2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff6383873f61db2207a8a1dc5db08d8618f7f7db;p=icinga2 Implement Service::GetFlappingThreshold(). --- diff --git a/lib/icinga/service-flapping.cpp b/lib/icinga/service-flapping.cpp index 6791ab4ba..512b48cdb 100644 --- a/lib/icinga/service-flapping.cpp +++ b/lib/icinga/service-flapping.cpp @@ -32,6 +32,14 @@ using namespace icinga; #define FLAPPING_INTERVAL (30 * 60) +double Service::GetFlappingThreshold(void) const +{ + if (m_FlappingThreshold.IsEmpty()) + return 30; + else + return m_FlappingThreshold; +} + bool Service::GetEnableFlapping(void) const { if (m_EnableFlapping.IsEmpty()) diff --git a/lib/icinga/service.h b/lib/icinga/service.h index 10b58ec9c..939c344ea 100644 --- a/lib/icinga/service.h +++ b/lib/icinga/service.h @@ -269,6 +269,8 @@ public: bool GetEnableFlapping(void) const; void SetEnableFlapping(bool enabled); + double GetFlappingThreshold(void) const; + bool IsFlapping(void) const; void UpdateFlappingStatus(bool stateChange);