diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php index 78a6f53af..86930e12e 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php @@ -53,7 +53,8 @@ class HostnotificationQuery extends IdoQuery 'services' => array( 'service' => 'so.name2 COLLATE latin1_general_ci', 'service_description' => 'so.name2', - 'service_display_name' => 's.display_name COLLATE latin1_general_ci' + 'service_display_name' => 's.display_name COLLATE latin1_general_ci', + 'service_host_name' => 'so.name1' ) ); diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php index ed8a1a911..f898c8699 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php @@ -3,7 +3,6 @@ namespace Icinga\Module\Monitoring\Backend\Ido\Query; -use Zend_Db_Expr; use Zend_Db_Select; use Icinga\Data\Filter\Filter; @@ -71,10 +70,9 @@ class NotificationQuery extends IdoQuery */ protected function joinHosts() { - $columns = array_keys($this->columnMap['notifications'] + $this->columnMap['hosts']); - foreach (array_keys($this->columnMap['services']) as $column) { - $columns[$column] = new Zend_Db_Expr('NULL'); - } + $columns = array_keys( + $this->columnMap['notifications'] + $this->columnMap['hosts'] + $this->columnMap['services'] + ); $hosts = $this->createSubQuery('hostnotification', $columns); $this->subQueries[] = $hosts; $this->notificationQuery->union(array($hosts), Zend_Db_Select::SQL_UNION_ALL);