mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
parent
1fe27e55e9
commit
3b4fc69fab
@ -92,6 +92,13 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult
|
|||||||
|
|
||||||
DbConnection::Ptr conn = static_pointer_cast<DbConnection>(dtype->GetObject(idoName));
|
DbConnection::Ptr conn = static_pointer_cast<DbConnection>(dtype->GetObject(idoName));
|
||||||
|
|
||||||
|
if (!conn) {
|
||||||
|
cr->SetOutput("IDO connection '" + idoName + "' does not exist.");
|
||||||
|
cr->SetState(ServiceUnknown);
|
||||||
|
checkable->ProcessCheckResult(cr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
double qps = conn->GetQueryCount(60) / 60.0;
|
double qps = conn->GetQueryCount(60) / 60.0;
|
||||||
|
|
||||||
if (!conn->GetConnected()) {
|
if (!conn->GetConnected()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user