]> granicus.if.org Git - icinga2/commitdiff
Implement Service::GetFlappingThreshold().
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 1 Jul 2013 12:30:19 +0000 (14:30 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 1 Jul 2013 12:30:19 +0000 (14:30 +0200)
lib/icinga/service-flapping.cpp
lib/icinga/service.h

index 6791ab4ba17ca5f904ebe6e5222268ade7fc2a76..512b48cdb59f4e0a1a2ee75e63d4af58d3f85596 100644 (file)
@@ -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())
index 10b58ec9ca2c9892be1991fcde8de66538c78253..939c344ea530dd3dbb80d366a73114253acccc43 100644 (file)
@@ -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);