ido Check: Add last failover timestamp to output when HA enabled IDO is running

This commit is contained in:
Michael Friedrich 2019-04-01 09:31:03 +02:00
parent 4a26a48778
commit 2913291a17
1 changed files with 6 additions and 0 deletions

View File

@ -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).";