mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-07 20:25:08 +02:00
parent
7231e9db9f
commit
2831991db4
@ -125,22 +125,22 @@ void ClusterZoneCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const Che
|
||||
if (connected) {
|
||||
cr->SetState(ServiceOK);
|
||||
cr->SetOutput("Zone '" + zoneName + "' is connected. Log lag: " + Utility::FormatDuration(zoneLag));
|
||||
|
||||
/* Check whether the thresholds have been resolved and compare them */
|
||||
if (missingLagCritical.IsEmpty() && zoneLag > lagCritical) {
|
||||
cr->SetState(ServiceCritical);
|
||||
cr->SetOutput("Zone '" + zoneName + "' is connected. Log lag: " + Utility::FormatDuration(zoneLag)
|
||||
+ " greater than critical threshold: " + Utility::FormatDuration(lagCritical));
|
||||
} else if (missingLagWarning.IsEmpty() && zoneLag > lagWarning) {
|
||||
cr->SetState(ServiceWarning);
|
||||
cr->SetOutput("Zone '" + zoneName + "' is connected. Log lag: " + Utility::FormatDuration(zoneLag)
|
||||
+ " greater than warning threshold: " + Utility::FormatDuration(lagWarning));
|
||||
}
|
||||
} else {
|
||||
cr->SetState(ServiceCritical);
|
||||
cr->SetOutput("Zone '" + zoneName + "' is not connected. Log lag: " + Utility::FormatDuration(zoneLag));
|
||||
}
|
||||
|
||||
/* Check whether the thresholds have been resolved and compare them */
|
||||
if (missingLagCritical.IsEmpty() && zoneLag > lagCritical) {
|
||||
cr->SetState(ServiceCritical);
|
||||
cr->SetOutput("Zone '" + zoneName + "' is connected. Log lag: " + Utility::FormatDuration(zoneLag)
|
||||
+ " greater than critical threshold: " + Utility::FormatDuration(lagCritical));
|
||||
} else if (missingLagWarning.IsEmpty() && zoneLag > lagWarning) {
|
||||
cr->SetState(ServiceWarning);
|
||||
cr->SetOutput("Zone '" + zoneName + "' is connected. Log lag: " + Utility::FormatDuration(zoneLag)
|
||||
+ " greater than warning threshold: " + Utility::FormatDuration(lagWarning));
|
||||
}
|
||||
|
||||
cr->SetPerformanceData(new Array({
|
||||
new PerfdataValue("slave_lag", zoneLag, false, "s", lagWarning, lagCritical),
|
||||
new PerfdataValue("last_messages_sent", lastMessageSent),
|
||||
|
Loading…
x
Reference in New Issue
Block a user