mirror of https://github.com/Icinga/icinga2.git
ido Check: Add last failover timestamp to output when HA enabled IDO is running
This commit is contained in:
parent
4a26a48778
commit
2913291a17
|
@ -139,6 +139,12 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult
|
|||
cr->SetState(ServiceOK);
|
||||
}
|
||||
|
||||
if (conn->GetEnableHa()) {
|
||||
double failoverTs = conn->GetLastFailover();
|
||||
|
||||
msgbuf << " Last failover: " << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S %z", failoverTs) << ".";
|
||||
}
|
||||
|
||||
/* Check whether the thresholds have been defined and match. */
|
||||
if (missingQueriesCritical.IsEmpty() && qps < queriesCritical) {
|
||||
msgbuf << " " << qps << " queries/s lower than critical threshold (" << queriesCritical << " queries/s).";
|
||||
|
|
Loading…
Reference in New Issue