diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php index e3524fc58..b35f50a19 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php @@ -96,6 +96,7 @@ class HostgroupsummaryQuery extends IdoQuery 'state_change' => 'host_last_state_change' ) ); + $hosts->select()->where('hgo.name1 IS NOT NULL'); // TODO(9458): Should be possible using our filters! $this->subQueries[] = $hosts; $services = $this->createSubQuery( 'Servicestatus', @@ -110,6 +111,7 @@ class HostgroupsummaryQuery extends IdoQuery 'state_change' => 'service_last_state_change' ) ); + $services->select()->where('hgo.name1 IS NOT NULL'); // TODO(9458): Should be possible using our filters! $this->subQueries[] = $services; $this->summaryQuery = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL); $this->select->from(array('statussummary' => $this->summaryQuery), array()); diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php index f7519edc7..a4c763562 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php @@ -88,6 +88,7 @@ class ServicegroupsummaryQuery extends IdoQuery 'state_change' => 'host_last_state_change' ) ); + $hosts->select()->where('sgo.name1 IS NOT NULL'); // TODO(9458): Should be possible using our filters! $this->subQueries[] = $hosts; $services = $this->createSubQuery( 'Servicestatus', @@ -102,6 +103,7 @@ class ServicegroupsummaryQuery extends IdoQuery 'state_change' => 'service_last_state_change' ) ); + $services->select()->where('sgo.name1 IS NOT NULL'); // TODO(9458): Should be possible using our filters! $this->subQueries[] = $services; $this->summaryQuery = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL); $this->select->from(array('statussummary' => $this->summaryQuery), array());