]> granicus.if.org Git - icinga2/commitdiff
Fix log messages for flapping 5732/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Wed, 8 Nov 2017 11:12:27 +0000 (12:12 +0100)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 8 Nov 2017 11:12:27 +0000 (12:12 +0100)
lib/icinga/checkable-check.cpp
lib/icinga/checkable.hpp

index a89fa1463b88f011cabe0126b46c5bbe4ceb925a..893903ba41d0ac0b713eaf22d2f7e3e10dd3ad48 100644 (file)
@@ -332,12 +332,15 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
 
        olock.Unlock();
 
-//     Log(LogDebug, "Checkable")
-//         << "Flapping: Checkable " << GetName()
-//         << " was: " << (was_flapping)
-//         << " is: " << is_flapping)
-//         << " threshold: " << GetFlappingThreshold()
-//         << "% current: " + GetFlappingCurrent()) << "%.";
+#ifdef I2_DEBUG /* I2_DEBUG */
+       Log(LogDebug, "Checkable")
+           << "Flapping: Checkable " << GetName()
+           << " was: " << was_flapping
+           << " is: " << is_flapping
+           << " threshold low: " << GetFlappingThresholdLow()
+           << " threshold high: " << GetFlappingThresholdHigh()
+           << "% current: " << GetFlappingCurrent() << "%.";
+#endif /* I2_DEBUG */
 
        OnNewCheckResult(this, cr, origin);
 
@@ -371,7 +374,8 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
                        OnNotificationsRequested(this, NotificationFlappingStart, cr, "", "", MessageOrigin::Ptr());
 
                Log(LogNotice, "Checkable")
-                       << "Flapping: Checkable '" << GetName() << "' started flapping (Current flapping value " << GetFlappingCurrent() << "% > threshold " << GetFlappingThresholdHigh() << "%).";
+                   << "Flapping Start: Checkable '" << GetName() << "' started flapping (Current flapping value "
+                   << GetFlappingCurrent() << "% > high threshold " << GetFlappingThresholdHigh() << "%).";
 
                NotifyFlapping(origin);
        } else if (!in_downtime && was_flapping && !is_flapping) {
@@ -380,7 +384,8 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
                        OnNotificationsRequested(this, NotificationFlappingEnd, cr, "", "", MessageOrigin::Ptr());
 
                Log(LogNotice, "Checkable")
-                       << "Flapping: Checkable '" << GetName() << "' stopped flapping (Current flapping value " << GetFlappingCurrent() << "% < threshold " << GetFlappingThresholdLow() << "%).";
+                   << "Flapping Stop: Checkable '" << GetName() << "' stopped flapping (Current flapping value "
+                   << GetFlappingCurrent() << "% < low threshold " << GetFlappingThresholdLow() << "%).";
 
                NotifyFlapping(origin);
        }
index 413e452d3f01432f756cdaba5bfa14f0a6afd895..4060f1d00688b49777147e36657eadb4b52b2309 100644 (file)
@@ -239,7 +239,6 @@ private:
 
        /* Flapping */
        void UpdateFlappingStatus(bool stateChange);
-       bool SuppressEvent(void) const;
 };
 
 }