mirror of https://github.com/Icinga/icinga2.git
Merge pull request #8613 from Icinga/bugfix/ido-built-in-checkcommand-overrides-crit-with-warn-state
IdoCheckTask: Don't override checkable critical with warn state
This commit is contained in:
commit
32cae11175
|
@ -165,7 +165,7 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult
|
|||
if (missingQueriesCritical.IsEmpty() && qps < queriesCritical) {
|
||||
msgbuf << " " << qps << " queries/s lower than critical threshold (" << queriesCritical << " queries/s).";
|
||||
|
||||
state= ServiceCritical;
|
||||
state = ServiceCritical;
|
||||
} else if (missingQueriesWarning.IsEmpty() && qps < queriesWarning) {
|
||||
msgbuf << " " << qps << " queries/s lower than warning threshold (" << queriesWarning << " queries/s).";
|
||||
|
||||
|
@ -181,8 +181,10 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult
|
|||
msgbuf << " " << pendingQueries << " pending queries greater than warning threshold ("
|
||||
<< pendingQueriesWarning << " queries).";
|
||||
|
||||
if (state == ServiceOK) {
|
||||
state = ServiceWarning;
|
||||
}
|
||||
}
|
||||
|
||||
cr->SetPerformanceData(new Array({
|
||||
{ new PerfdataValue("queries", qps, false, "", queriesWarning, queriesCritical) },
|
||||
|
|
Loading…
Reference in New Issue