]> granicus.if.org Git - icinga2/commitdiff
DB IDO should provide its connected state via /v1/status
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 16 Oct 2015 11:02:41 +0000 (13:02 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 16 Oct 2015 11:02:41 +0000 (13:02 +0200)
fixes #10383

lib/db_ido_mysql/idomysqlconnection.cpp
lib/db_ido_pgsql/idopgsqlconnection.cpp

index 8e2dbd2f39ee0b80c112167f902e23ec0318ce77..a189220c21a15f7a247218fb95b317d766e44167 100644 (file)
@@ -52,6 +52,7 @@ void IdoMysqlConnection::StatsFunc(const Dictionary::Ptr& status, const Array::P
                Dictionary::Ptr stats = new Dictionary();
                stats->Set("version", idomysqlconnection->GetSchemaVersion());
                stats->Set("instance_name", idomysqlconnection->GetInstanceName());
+               stats->Set("connected", idomysqlconnection->GetConnected());
                stats->Set("query_queue_items", items);
 
                nodes->Set(idomysqlconnection->GetName(), stats);
index d04a616964d0962714e2a800b2b058f9595a4515..7866c1c1f2e06f6b0067ec0b0ae0463ed2f90469 100644 (file)
@@ -53,6 +53,7 @@ void IdoPgsqlConnection::StatsFunc(const Dictionary::Ptr& status, const Array::P
 
                Dictionary::Ptr stats = new Dictionary();
                stats->Set("version", idopgsqlconnection->GetSchemaVersion());
+               stats->Set("connected", idopgsqlconnection->GetConnected());
                stats->Set("instance_name", idopgsqlconnection->GetInstanceName());
                stats->Set("query_queue_items", items);