]> granicus.if.org Git - icinga2/commitdiff
DB IDO: Do not update endpointstatus table on config updates
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 16 Jul 2015 11:24:49 +0000 (13:24 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 16 Jul 2015 11:25:11 +0000 (13:25 +0200)
fixes #9634

lib/db_ido/endpointdbobject.cpp
lib/db_ido/endpointdbobject.hpp

index 60a243fd43a85e32e244f76e4303373c05c2844d..21fa9ae25817658cdbf44d9e7881ce22afbbed3a 100644 (file)
@@ -108,26 +108,3 @@ int EndpointDbObject::EndpointIsConnected(const Endpoint::Ptr& endpoint)
 
        return is_connected;
 }
-
-void EndpointDbObject::OnConfigUpdate(void)
-{
-       /* update current status on config dump once */
-       Endpoint::Ptr endpoint = static_pointer_cast<Endpoint>(GetObject());
-
-       DbQuery query1;
-       query1.Table = "endpointstatus";
-       query1.Type = DbQueryInsert;
-       query1.Category = DbCatConfig;
-
-       Dictionary::Ptr fields1 = new Dictionary();
-       fields1->Set("identity", endpoint->GetName());
-       fields1->Set("node", IcingaApplication::GetInstance()->GetNodeName());
-       fields1->Set("zone_object_id", endpoint->GetZone());
-       fields1->Set("is_connected", EndpointIsConnected(endpoint));
-       fields1->Set("status_update_time", DbValue::FromTimestamp(Utility::GetTime()));
-       fields1->Set("endpoint_object_id", endpoint);
-       fields1->Set("instance_id", 0); /* DbConnection class fills in real ID */
-       query1.Fields = fields1;
-
-       OnQuery(query1);
-}
index febe64a201269a1097526532c7cfe60dca5cdb95..66f6555ea85af1cccdd0698090f265c64ee00f64 100644 (file)
@@ -44,9 +44,6 @@ public:
        virtual Dictionary::Ptr GetConfigFields(void) const;
        virtual Dictionary::Ptr GetStatusFields(void) const;
 
-protected:
-       virtual void OnConfigUpdate(void);
-
 private:
        static void UpdateConnectedStatus(const Endpoint::Ptr& endpoint);
        static int EndpointIsConnected(const Endpoint::Ptr& endpoint);