[icinga-checkins] icinga.org: icinga2/feature/gelf-writer-7619: Add missing category type for some IDO queries

git at icinga.org git at icinga.org
Mon Nov 10 20:27:20 CET 2014


Module: icinga2
Branch: feature/gelf-writer-7619
Commit: 4df3fd44515142e951fd53ce6a00bfeb392b4442
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=4df3fd44515142e951fd53ce6a00bfeb392b4442

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Mon Nov 10 13:21:33 2014 +0100

Add missing category type for some IDO queries

fixes #7625

---

 lib/db_ido/dbevents.cpp         |    4 ++++
 lib/db_ido/endpointdbobject.cpp |    2 ++
 2 files changed, 6 insertions(+)

diff --git a/lib/db_ido/dbevents.cpp b/lib/db_ido/dbevents.cpp
index 08cf55c..57e680f 100644
--- a/lib/db_ido/dbevents.cpp
+++ b/lib/db_ido/dbevents.cpp
@@ -98,6 +98,7 @@ void DbEvents::NextCheckChangedHandler(const Checkable::Ptr& checkable, double n
 		query1.Table = "hoststatus";
 
 	query1.Type = DbQueryUpdate;
+	query1.Category = DbCatState;
 
 	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("next_check", DbValue::FromTimestamp(nextCheck));
@@ -128,6 +129,7 @@ void DbEvents::FlappingChangedHandler(const Checkable::Ptr& checkable, FlappingS
 		query1.Table = "hoststatus";
 
 	query1.Type = DbQueryUpdate;
+	query1.Category = DbCatState;
 
 	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("is_flapping", CompatUtility::GetCheckableIsFlapping(checkable));
@@ -163,6 +165,7 @@ void DbEvents::LastNotificationChangedHandler(const Notification::Ptr& notificat
 		query1.Table = "hoststatus";
 
 	query1.Type = DbQueryUpdate;
+	query1.Category = DbCatState;
 
 	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("last_notification", DbValue::FromTimestamp(now_bag.first));
@@ -221,6 +224,7 @@ void DbEvents::EnableChangedHandlerInternal(const Checkable::Ptr& checkable, boo
 		query1.Table = "hoststatus";
 
 	query1.Type = DbQueryUpdate;
+	query1.Category = DbCatState;
 
 	Dictionary::Ptr fields1 = new Dictionary();
 
diff --git a/lib/db_ido/endpointdbobject.cpp b/lib/db_ido/endpointdbobject.cpp
index 98d7e73..7977489 100644
--- a/lib/db_ido/endpointdbobject.cpp
+++ b/lib/db_ido/endpointdbobject.cpp
@@ -82,6 +82,7 @@ void EndpointDbObject::UpdateConnectedStatus(const Endpoint::Ptr& endpoint)
 	DbQuery query1;
 	query1.Table = "endpointstatus";
 	query1.Type = DbQueryUpdate;
+	query1.Category = DbCatState;
 
 	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("is_connected", (connected ? 1 : 0));
@@ -114,6 +115,7 @@ void EndpointDbObject::OnConfigUpdate(void)
 	DbQuery query1;
 	query1.Table = "endpointstatus";
 	query1.Type = DbQueryInsert;
+	query1.Category = DbCatConfig;
 
 	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("identity", endpoint->GetName());



More information about the icinga-checkins mailing list