mirror of https://github.com/Icinga/icinga2.git
Fix log messages for flapping
This commit is contained in:
parent
026f6d6f2e
commit
41d54029c8
|
@ -332,12 +332,15 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
||||||
|
|
||||||
olock.Unlock();
|
olock.Unlock();
|
||||||
|
|
||||||
// Log(LogDebug, "Checkable")
|
#ifdef I2_DEBUG /* I2_DEBUG */
|
||||||
// << "Flapping: Checkable " << GetName()
|
Log(LogDebug, "Checkable")
|
||||||
// << " was: " << (was_flapping)
|
<< "Flapping: Checkable " << GetName()
|
||||||
// << " is: " << is_flapping)
|
<< " was: " << was_flapping
|
||||||
// << " threshold: " << GetFlappingThreshold()
|
<< " is: " << is_flapping
|
||||||
// << "% current: " + GetFlappingCurrent()) << "%.";
|
<< " threshold low: " << GetFlappingThresholdLow()
|
||||||
|
<< " threshold high: " << GetFlappingThresholdHigh()
|
||||||
|
<< "% current: " << GetFlappingCurrent() << "%.";
|
||||||
|
#endif /* I2_DEBUG */
|
||||||
|
|
||||||
OnNewCheckResult(this, cr, origin);
|
OnNewCheckResult(this, cr, origin);
|
||||||
|
|
||||||
|
@ -371,7 +374,8 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
||||||
OnNotificationsRequested(this, NotificationFlappingStart, cr, "", "", MessageOrigin::Ptr());
|
OnNotificationsRequested(this, NotificationFlappingStart, cr, "", "", MessageOrigin::Ptr());
|
||||||
|
|
||||||
Log(LogNotice, "Checkable")
|
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);
|
NotifyFlapping(origin);
|
||||||
} else if (!in_downtime && was_flapping && !is_flapping) {
|
} 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());
|
OnNotificationsRequested(this, NotificationFlappingEnd, cr, "", "", MessageOrigin::Ptr());
|
||||||
|
|
||||||
Log(LogNotice, "Checkable")
|
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);
|
NotifyFlapping(origin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,6 @@ private:
|
||||||
|
|
||||||
/* Flapping */
|
/* Flapping */
|
||||||
void UpdateFlappingStatus(bool stateChange);
|
void UpdateFlappingStatus(bool stateChange);
|
||||||
bool SuppressEvent(void) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue