[icinga-checkins] icinga.org: icinga-api/mhein/default: * Adding instances to group queries

git at icinga.org git at icinga.org
Tue Jul 27 12:24:27 CEST 2010


Module: icinga-api
Branch: mhein/default
Commit: 920ea993fb892d1e17a671c254d3e6f3291c4460
URL:    https://git.icinga.org/?p=icinga-api.git;a=commit;h=920ea993fb892d1e17a671c254d3e6f3291c4460

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Jul 27 12:24:15 2010 +0200

* Adding instances to group queries

---

 .../data_interfaces/IcingaApiSearchIdoMysql.php    |    2 ++
 .../data_interfaces/IcingaApiSearchIdoOci.php      |    2 ++
 .../data_interfaces/IcingaApiSearchIdoOci8.php     |    2 ++
 .../data_interfaces/IcingaApiSearchIdoPgsql.php    |    2 ++
 4 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php b/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
index 444a81e..344156d 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
@@ -331,6 +331,7 @@ implements IcingaApiSearchIdoInterface {
 				${FIELDS}
 			from
 				${TABLE_PREFIX}hostgroups hg
+			${if_table:i,hg:inner join ${TABLE_PREFIX}instances i on i.instance_id = hg.instance_id}
 			${if_table:ohg:inner join ${TABLE_PREFIX}objects ohg on ohg.object_id = hg.hostgroup_object_id and ohg.is_active = 1}
 			${if_table:hgm:inner join ${TABLE_PREFIX}hostgroup_members hgm on hgm.hostgroup_id = hg.hostgroup_id}
 			${if_table:oh,hgm:inner join ${TABLE_PREFIX}objects oh on oh.object_id = hgm.host_object_id}
@@ -345,6 +346,7 @@ implements IcingaApiSearchIdoInterface {
 				${FIELDS}
 			from
 			${TABLE_PREFIX}servicegroups sg
+			${if_table:i,sg:inner join ${TABLE_PREFIX}instances i on i.instance_id = sg.instance_id}
 			${if_table:osg:inner join ${TABLE_PREFIX}objects osg on osg.object_id = sg.servicegroup_object_id and osg.is_active = 1}
 			${if_table:sgm:inner join ${TABLE_PREFIX}servicegroup_members sgm on sgm.servicegroup_id = sg.servicegroup_id}
 			${if_table:os,sgm:inner join ${TABLE_PREFIX}objects os on os.object_id = sgm.service_object_id}
diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoOci.php b/objects/search/data_interfaces/IcingaApiSearchIdoOci.php
index 91ffb9a..3fb8508 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoOci.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoOci.php
@@ -328,6 +328,7 @@ class IcingaApiSearchIdoOci
 				${FIELDS}
 			from
 				${TABLE_PREFIX}hostgroups hg
+			${if_table:i,hg:inner join ${TABLE_PREFIX}instances i on i.id = hg.instance_id}
 			${if_table:ohg:inner join ${TABLE_PREFIX}objects ohg on ohg.id = hg.hostgroup_object_id and ohg.is_active = 1}
 			${if_table:hgm:inner join ${TABLE_PREFIX}hostgroup_members hgm on hgm.hostgroup_id = hg.id}
 			${if_table:oh,hgm:inner join ${TABLE_PREFIX}objects oh on oh.id = hgm.host_object_id}
@@ -342,6 +343,7 @@ class IcingaApiSearchIdoOci
 				${FIELDS}
 			from
 			${TABLE_PREFIX}servicegroups sg
+			${if_table:i,sg:inner join ${TABLE_PREFIX}instances i on i.id = sg.instance_id}
 			${if_table:osg:inner join ${TABLE_PREFIX}objects osg on osg.id = sg.servicegroup_object_id and osg.is_active = 1}
 			${if_table:sgm:inner join ${TABLE_PREFIX}servicegroup_members sgm on sgm.servicegroup_id = sg.id}
 			${if_table:os,sgm:inner join ${TABLE_PREFIX}objects os on os.id = sgm.service_object_id}
diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php b/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php
index 56709f8..fc22ae2 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoOci8.php
@@ -331,6 +331,7 @@ class IcingaApiSearchIdoOci8
 				${FIELDS}
 			from
 				${TABLE_PREFIX}hostgroups hg
+			${if_table:i,hg:inner join ${TABLE_PREFIX}instances i on i.id = hg.instance_id}
 			${if_table:ohg:inner join ${TABLE_PREFIX}objects ohg on ohg.id = hg.hostgroup_object_id and ohg.is_active = 1}
 			${if_table:hgm:inner join ${TABLE_PREFIX}hostgroup_members hgm on hgm.hostgroup_id = hg.id}
 			${if_table:oh,hgm:inner join ${TABLE_PREFIX}objects oh on oh.id = hgm.host_object_id}
@@ -345,6 +346,7 @@ class IcingaApiSearchIdoOci8
 				${FIELDS}
 			from
 			${TABLE_PREFIX}servicegroups sg
+			${if_table:i,sg:inner join ${TABLE_PREFIX}instances i on i.id = sg.instance_id}
 			${if_table:osg:inner join ${TABLE_PREFIX}objects osg on osg.id = sg.servicegroup_object_id and osg.is_active = 1}
 			${if_table:sgm:inner join ${TABLE_PREFIX}servicegroup_members sgm on sgm.servicegroup_id = sg.id}
 			${if_table:os,sgm:inner join ${TABLE_PREFIX}objects os on os.id = sgm.service_object_id}
diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoPgsql.php b/objects/search/data_interfaces/IcingaApiSearchIdoPgsql.php
index c6ad0c8..8ffb647 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoPgsql.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoPgsql.php
@@ -310,6 +310,7 @@ class IcingaApiSearchIdoPgsql
 				${FIELDS}
 			from
 				${TABLE_PREFIX}hostgroups hg
+			${if_table:i,hg:inner join ${TABLE_PREFIX}instances i on i.instance_id = hg.instance_id}
 			${if_table:ohg:inner join ${TABLE_PREFIX}objects ohg on ohg.object_id = hg.hostgroup_object_id and ohg.is_active = 1}
 			${if_table:hgm:inner join ${TABLE_PREFIX}hostgroup_members hgm on hgm.hostgroup_id = hg.hostgroup_id}
 			${if_table:oh,hgm:inner join ${TABLE_PREFIX}objects oh on oh.object_id = hgm.host_object_id}
@@ -323,6 +324,7 @@ class IcingaApiSearchIdoPgsql
 				${FIELDS}
 			from
 			${TABLE_PREFIX}servicegroups sg
+			${if_table:i,sg:inner join ${TABLE_PREFIX}instances i on i.instance_id = sg.instance_id}
 			${if_table:osg:inner join ${TABLE_PREFIX}objects osg on osg.object_id = sg.servicegroup_object_id and osg.is_active = 1}
 			${if_table:sgm:inner join ${TABLE_PREFIX}servicegroup_members sgm on sgm.servicegroup_id = sg.servicegroup_id}
 			${if_table:os,sgm:inner join ${TABLE_PREFIX}objects os on os.object_id = sgm.service_object_id}





More information about the icinga-checkins mailing list