[icinga-checkins] icinga.org: icinga-api/master: * added column variables for host-parent queries

Christian Doebler christian.doebler at netways.de
Sat Oct 3 21:37:29 CEST 2009


Module: icinga-api
Branch: master
Commit: 8a2486cb28df8b2513de7e3da62efbaf1c5fe0ac
URL:    https://git.icinga.org/?p=icinga-api.git;a=commit;h=8a2486cb28df8b2513de7e3da62efbaf1c5fe0ac

Author: Christian Doebler <christian.doebler at netways.de>
Date:   Sat Oct  3 20:27:24 2009 +0200

* added column variables for host-parent queries
* changed default column names for host-parent queries

---

 objects/search/IcingaApiSearchColumnsIdo.php |    8 ++++++++
 objects/search/IcingaApiSearchIdo.php        |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/objects/search/IcingaApiSearchColumnsIdo.php b/objects/search/IcingaApiSearchColumnsIdo.php
index 6026323..1150ffd 100644
--- a/objects/search/IcingaApiSearchColumnsIdo.php
+++ b/objects/search/IcingaApiSearchColumnsIdo.php
@@ -94,6 +94,10 @@ class IcingaApiSearchColumnsIdo {
 		'HOST_STATUS_ALL' => 'hs.*',
 		'HOST_STATE' => 'hs.current_state host_state',
 		'HOST_STATE_COUNT' => 'count(hs.current_state) host_state_count',
+		'HOST_PARENT_OBJECT_ID' => 'ohp.object_id host_parent_object_id',
+		'HOST_PARENT_NAME' => 'ohp.name1 host_parent_name',
+		'HOST_CHILD_OBJECT_ID' => 'oh.object_id host_child_object_id',
+		'HOST_CHILD_NAME' => 'oh.name1 host_child_name',
 
 		// Service data
 		'SERVICE_ID' => 's.service_id',
@@ -241,6 +245,10 @@ class IcingaApiSearchColumnsIdo {
 		'HOST_SCHEDULED_DOWNTIME_DEPTH' => 'hs.scheduled_downtime_depth',
 		'HOST_STATUS_UPDATE_TIME' => 'hs.status_update_time',
 		'HOST_STATE' => 'hs.current_state',
+		'HOST_PARENT_OBJECT_ID' => 'ohp.object_id',
+		'HOST_PARENT_NAME' => 'ohp.name1',
+		'HOST_CHILD_OBJECT_ID' => 'oh.object_id',
+		'HOST_CHILD_NAME' => 'oh.name1',
 
 		// Service data
 		'SERVICE_ID' => 's.service_id',
diff --git a/objects/search/IcingaApiSearchIdo.php b/objects/search/IcingaApiSearchIdo.php
index 10a04fd..5ef7b26 100644
--- a/objects/search/IcingaApiSearchIdo.php
+++ b/objects/search/IcingaApiSearchIdo.php
@@ -224,7 +224,7 @@ class IcingaApiSearchIdo
 				${LIMIT}',
 		self::TARGET_HOST_PARENTS =>
 			'select
-				${FIELDS:ohp.object_id parent_object_id, ohp.name1 parent_name, oh.object_id child_object_id, oh.name1 child_name}
+				${FIELDS:ohp.object_id host_parent_object_id, ohp.name1 host_parent_name, oh.object_id host_child_object_id, oh.name1 host_child_name}
 			from
 				${TABLE_PREFIX}objects ohp
 			inner join ${TABLE_PREFIX}host_parenthosts hph on hph.parent_host_object_id = ohp.object_id





More information about the icinga-checkins mailing list