+ = $this->sortControl->render($this); ?>
+ = $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
+
+
+
+
+
+
+ = $hostgroup->hostgroup_name; ?>
+
+ |
+
+
+ = $hostgroup->cnt_hosts_up; ?>
+ = $hostgroup->cnt_hosts_unreachable; ?>/= $hostgroup->cnt_hosts_unreachable_unhandled; ?>
+ = $hostgroup->cnt_hosts_down; ?>/= $hostgroup->cnt_hosts_down_unhandled; ?>
+ = $hostgroup->cnt_hosts_pending; ?>
+
+ |
+
+
+ = $hostgroup->cnt_services_ok; ?>
+ = $hostgroup->cnt_services_unknown; ?>/= $hostgroup->cnt_services_unknown_unhandled; ?>
+ = $hostgroup->cnt_services_critical; ?>/= $hostgroup->cnt_services_critical_unhandled; ?>
+ = $hostgroup->cnt_services_warning; ?>/= $hostgroup->cnt_services_warning_unhandled; ?>
+ = $hostgroup->cnt_services_pending; ?>
+
+ |
+
+
+
+
+ = $this->paginationControl($hostgroups, null, null, array('preserve' => $this->preserve)); ?>
+
diff --git a/modules/monitoring/application/views/scripts/list/servicegroups.phtml b/modules/monitoring/application/views/scripts/list/servicegroups.phtml
new file mode 100644
index 000000000..b8f521385
--- /dev/null
+++ b/modules/monitoring/application/views/scripts/list/servicegroups.phtml
@@ -0,0 +1,35 @@
+
+ = $this->sortControl->render($this); ?>
+ = $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
+
+
+
+
+
+
+ = $servicegroup->servicegroup_name; ?>
+
+ |
+
+
+ = $servicegroup->cnt_hosts_up; ?>
+ = $servicegroup->cnt_hosts_unreachable; ?>/= $servicegroup->cnt_hosts_unreachable_unhandled; ?>
+ = $servicegroup->cnt_hosts_down; ?>/= $servicegroup->cnt_hosts_down_unhandled; ?>
+ = $servicegroup->cnt_hosts_pending; ?>
+
+ |
+
+
+ = $servicegroup->cnt_services_ok; ?>
+ = $servicegroup->cnt_services_unknown; ?>/= $servicegroup->cnt_services_unknown_unhandled; ?>
+ = $servicegroup->cnt_services_critical; ?>/= $servicegroup->cnt_services_critical_unhandled; ?>
+ = $servicegroup->cnt_services_warning; ?>/= $servicegroup->cnt_services_warning_unhandled; ?>
+ = $servicegroup->cnt_services_pending; ?>
+
+ |
+
+
+
+
+ = $this->paginationControl($servicegroups, null, null, array('preserve' => $this->preserve)); ?>
+
diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/GroupsummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/GroupsummaryQuery.php
new file mode 100644
index 000000000..fc9b379a8
--- /dev/null
+++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/GroupsummaryQuery.php
@@ -0,0 +1,144 @@
+ array(
+ 'host_state' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 99 ELSE hs.current_state END',
+ 'cnt_hosts_up' => 'SUM(CASE WHEN hs.has_been_checked != 0 AND hs.has_been_checked IS NOT NULL AND hs.current_state = 0 THEN 1 ELSE 0 END)',
+ 'cnt_hosts_unreachable' => 'SUM(CASE WHEN hs.has_been_checked != 0 AND hs.has_been_checked IS NOT NULL AND hs.current_state = 2 AND hs.problem_has_been_acknowledged + hs.scheduled_downtime_depth = 0 THEN 1 ELSE 0 END)',
+ 'cnt_hosts_unreachable_unhandled' => 'SUM(CASE WHEN hs.has_been_checked != 0 AND hs.has_been_checked IS NOT NULL AND hs.current_state = 2 AND hs.problem_has_been_acknowledged + hs.scheduled_downtime_depth != 0 THEN 1 ELSE 0 END)',
+ 'cnt_hosts_down' => 'SUM(CASE WHEN hs.has_been_checked != 0 AND hs.has_been_checked IS NOT NULL AND hs.current_state = 1 AND hs.problem_has_been_acknowledged + hs.scheduled_downtime_depth = 0 THEN 1 ELSE 0 END)',
+ 'cnt_hosts_down_unhandled' => 'SUM(CASE WHEN hs.has_been_checked != 0 AND hs.has_been_checked IS NOT NULL AND hs.current_state = 1 AND hs.problem_has_been_acknowledged + hs.scheduled_downtime_depth != 0 THEN 1 ELSE 0 END)',
+ 'cnt_hosts_pending' => 'SUM(CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 1 ELSE 0 END)'
+ ),
+ 'servicestatus' => array(
+ 'service_state' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 99 ELSE ss.current_state END',
+ 'cnt_services_ok' => 'SUM(CASE WHEN ss.has_been_checked != 0 AND ss.has_been_checked IS NOT NULL AND ss.current_state = 0 THEN 1 ELSE 0 END)',
+ 'cnt_services_unknown' => 'SUM(CASE WHEN ss.has_been_checked != 0 AND ss.has_been_checked IS NOT NULL AND ss.current_state = 3 AND ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth = 0 THEN 1 ELSE 0 END)',
+ 'cnt_services_unknown_unhandled' => 'SUM(CASE WHEN ss.has_been_checked != 0 AND ss.has_been_checked IS NOT NULL AND ss.current_state = 3 AND ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth != 0 THEN 1 ELSE 0 END)',
+ 'cnt_services_critical' => 'SUM(CASE WHEN ss.has_been_checked != 0 AND ss.has_been_checked IS NOT NULL AND ss.current_state = 2 AND ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth = 0 THEN 1 ELSE 0 END)',
+ 'cnt_services_critical_unhandled' => 'SUM(CASE WHEN ss.has_been_checked != 0 AND ss.has_been_checked IS NOT NULL AND ss.current_state = 2 AND ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth != 0 THEN 1 ELSE 0 END)',
+ 'cnt_services_warning' => 'SUM(CASE WHEN ss.has_been_checked != 0 AND ss.has_been_checked IS NOT NULL AND ss.current_state = 1 AND ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth = 0 THEN 1 ELSE 0 END)',
+ 'cnt_services_warning_unhandled' => 'SUM(CASE WHEN ss.has_been_checked != 0 AND ss.has_been_checked IS NOT NULL AND ss.current_state = 1 AND ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth != 0 THEN 1 ELSE 0 END)',
+ 'cnt_services_pending' => 'SUM(CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 1 ELSE 0 END)'
+ ),
+ 'hostgroups' => array(
+ 'hostgroup_name' => 'hgo.name1 COLLATE latin1_general_ci'
+ ),
+ 'servicegroups' => array(
+ 'servicegroup_name' => 'sgo.name1 COLLATE latin1_general_ci'
+ )
+ );
+
+ protected function joinBaseTables()
+ {
+ $this->baseQuery = $this->db->select()->from(
+ array('ho' => $this->prefix . 'objects'),
+ array()
+ )->join(
+ array('hs' => $this->prefix . 'hoststatus'),
+ 'ho.object_id = hs.host_object_id AND ho.is_active = 1 AND ho.objecttype_id = 1',
+ array()
+ )->join(
+ array('h' => $this->prefix . 'hosts'),
+ 'hs.host_object_id = h.host_object_id',
+ array()
+ );
+ $this->joinedVirtualTables = array(
+ 'hosts' => true,
+ 'hoststatus' => true
+ );
+ }
+
+ protected function joinServiceStatus()
+ {
+ $this->requireVirtualTable('services');
+ }
+
+ protected function joinServices()
+ {
+ $this->baseQuery->join(
+ array('s' => $this->prefix . 'services'),
+ 's.host_object_id = h.host_object_id',
+ array()
+ )->join(
+ array('so' => $this->prefix . 'objects'),
+ 'so.' . $this->object_id . ' = s.service_object_id AND so.is_active = 1',
+ array()
+ )->joinLeft(
+ array('ss' => $this->prefix . 'servicestatus'),
+ 'so.' . $this->object_id . ' = ss.service_object_id',
+ array()
+ );
+ }
+
+ protected function joinHostgroups()
+ {
+ if (in_array('servicegroup_name', $this->getColumns())) {
+ return $this->joinServiceHostgroups();
+ } else {
+ return $this->joinHostHostgroups();
+ }
+ }
+
+ protected function joinHostHostgroups()
+ {
+ $this->baseQuery->join(
+ array('hgm' => $this->prefix . 'hostgroup_members'),
+ 'hgm.host_object_id = h.host_object_id',
+ array()
+ )->join(
+ array('hg' => $this->prefix . 'hostgroups'),
+ 'hgm.hostgroup_id = hg.' . $this->hostgroup_id,
+ array()
+ )->join(
+ array('hgo' => $this->prefix . 'objects'),
+ 'hgo.' . $this->object_id . ' = hg.hostgroup_object_id AND hgo.is_active = 1',
+ array()
+ );
+ $this->baseQuery->group('hgo.name1');
+ return $this;
+ }
+
+ protected function joinServiceHostgroups()
+ {
+ $this->baseQuery->join(
+ array('hgm' => $this->prefix . 'hostgroup_members'),
+ 'hgm.host_object_id = s.host_object_id',
+ array()
+ )->join(
+ array('hg' => $this->prefix . 'hostgroups'),
+ 'hgm.hostgroup_id = hg.' . $this->hostgroup_id,
+ array()
+ )->join(
+ array('hgo' => $this->prefix . 'objects'),
+ 'hgo.' . $this->object_id . ' = hg.hostgroup_object_id AND hgo.is_active = 1',
+ array()
+ );
+ return $this;
+ }
+
+ protected function joinServicegroups()
+ {
+ $this->requireVirtualTable('services');
+ $this->baseQuery->join(
+ array('sgm' => $this->prefix . 'servicegroup_members'),
+ 'sgm.service_object_id = s.service_object_id',
+ array()
+ )->join(
+ array('sg' => $this->prefix . 'servicegroups'),
+ 'sgm.servicegroup_id = sg.' . $this->servicegroup_id,
+ array()
+ )->join(
+ array('sgo' => $this->prefix . 'objects'),
+ 'sgo.' . $this->object_id. ' = sg.servicegroup_object_id AND sgo.is_active = 1',
+ array()
+ );
+ $this->baseQuery->group('sgo.name1');
+ return $this;
+ }
+}
+
diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php
index 21087346d..bf6459eb9 100644
--- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php
+++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php
@@ -43,7 +43,7 @@ class ServicestatusQuery extends AbstractQuery
),
'servicegroups' => array(
'servicegroups' => 'sgo.name1',
- ),
+ )
);
protected function getDefaultColumns()
diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php
index ac0afa128..a249c9e5b 100644
--- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php
+++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php
@@ -286,9 +286,13 @@ class StatusQuery extends AbstractQuery
array()
)->join(
array('hg' => $this->prefix . 'hostgroups'),
- 'hgm.hostgroup_id = hg' . $this->hostgroup_id,
+ 'hgm.hostgroup_id = hg.' . $this->hostgroup_id,
array()
- );
+ )->join(
+ array('hgo' => $this->prefix . 'objects'),
+ 'hgo.' . $this->object_id . ' = hg.hostgroup_object_id AND hgo.is_active = 1',
+ array()
+ );
return $this;
}
diff --git a/modules/monitoring/library/Monitoring/DataView/Groupsummary.php b/modules/monitoring/library/Monitoring/DataView/Groupsummary.php
new file mode 100644
index 000000000..d292e9a3c
--- /dev/null
+++ b/modules/monitoring/library/Monitoring/DataView/Groupsummary.php
@@ -0,0 +1,51 @@
+getQuery()->getColumns())) {
+ return array(
+ 'servicegroup_name' => array(
+ 'order' => self::SORT_ASC
+ )
+ );
+ }
+ return array(
+ 'hostgroup_name' => array(
+ 'order' => self::SORT_ASC
+ )
+ );
+ }
+}
diff --git a/public/css/main.css b/public/css/main.css
index f144c45b1..d6422a464 100644
--- a/public/css/main.css
+++ b/public/css/main.css
@@ -627,7 +627,7 @@ select.input-sm {
.nav-stacked {
- #background-color: #f8f8f8;
+ background-color: #f8f8f8;
}
.icinga-subnavigation {
@@ -641,11 +641,11 @@ select.input-sm {
padding-top: 1px;
padding-bottom: 1px;
border-bottom: 1px dotted #049baf;
- #border-right: 1px dotted #049baf;
+ border-right: 1px dotted #049baf;
}
.nav-stacked > li:first-child {
- #border-top: 1px dotted #049baf;
+ border-top: 1px dotted #049baf;
}
@@ -654,7 +654,7 @@ select.input-sm {
padding-top: 8px;
padding-bottom: 8px;
border-bottom: 1px dotted #049baf;
- #border-right: 1px dotted #049baf;
+ border-right: 1px dotted #049baf;
}
ul.icinga-subnavigation {
@@ -809,3 +809,159 @@ ul.icinga-subnavigation {
border: 1px solid #ff3300;
}
+.state-tile {
+ border-style: solid;
+ border-width: 1px;
+ padding: 3px 5px 3px 5px;
+ border-radius: 3px;
+ font-size: 13px;
+}
+
+.state-tile-up {
+ /* less */
+ border-style: solid;
+ border-width: 1px;
+ padding: 3px 5px 3px 5px;
+ border-radius: 3px;
+ font-size: 13px;
+ /* less */
+ border-color: #00CC33;
+ color: #00CC33;
+}
+
+.state-tile-unreachable {
+ /* less */
+ border-style: solid;
+ border-width: 1px;
+ padding: 3px 5px 3px 5px;
+ border-radius: 3px;
+ font-size: 13px;
+ /* less */
+ border-color: #E066FF;
+ color: #E066FF;
+}
+
+.state-tile-down {
+ /* less */
+ border-style: solid;
+ border-width: 1px;
+ padding: 3px 5px 3px 5px;
+ border-radius: 3px;
+ font-size: 13px;
+ /* less */
+ border-color: #FF3300;
+ color: #FF3300;
+}
+
+.state-tile-pending {
+ /* less */
+ border-style: solid;
+ border-width: 1px;
+ padding: 3px 5px 3px 5px;
+ border-radius: 3px;
+ font-size: 13px;
+ /* less */
+ border-color: #c0c0c0;
+ color: #c0c0c0;
+}
+
+.icinga-icon-user {
+ background-attachment: scroll;
+ background-clip: border-box;
+ background-color: rgba(0, 0, 0, 0);
+ background-image: url("../img/icons/user.png");
+ background-origin: padding-box;
+ background-position: center center;
+ background-repeat: no-repeat;
+ background-size: auto auto;
+ display: inline-block;
+ height: 16px;
+ width: 16px;
+}
+
+.icinga-navbar {
+ margin-right: 15px;
+}
+.icinga-navbar-reload {
+ margin-top: 13px;
+ margin-right: 40px;
+}
+
+.icinga-navbar-search {
+ background-image: url('../img/icons/search.png');
+ background-repeat: no-repeat;
+ background-position: 5px 50%;
+ padding-left: 25px !important;
+}
+
+.icinga-navbar-search-container {
+ border-left: 1px solid #ddd;
+ padding-left: 15px;
+ margin-top: 12px;
+}
+
+
+
+.icinga-navbar-hosts-container {
+ background-image: url('../img/icons/host.png');
+ background-repeat: no-repeat;
+ background-position: 5px 50%;
+ padding-left: 30px !important;
+ margin-top: 15px;
+}
+.icinga-navbar-services-container {
+ background-image: url('../img/icons/service.png');
+ background-repeat: no-repeat;
+ background-position: 5px 50%;
+ padding-left: 25px !important;
+ margin-top: 15px;
+}
+
+.icinga-navbar-pills {
+ border-style: solid;
+ border-width: 1px;
+ padding: 3px 5px 3px 5px;
+ border-radius: 3px;
+ font-size: 13px;
+}
+
+
+
+/** Service status **/
+
+.icinga-navbar-pills-critical {
+ border-color: #FF3300;
+ color: #FF3300;
+}
+
+.icinga-navbar-pills-ok {
+ border-color: #00CC33;
+ color: #00CC33;
+}
+
+.icinga-navbar-pills-warning {
+ border-color: #FFA500;
+ color: #FFA500;
+}
+
+.icinga-navbar-pills-unknown {
+ border-color: #E066FF;
+ color: #E066FF;
+}
+
+/** Host status **/
+
+.icinga-navbar-pills-unreachable {
+ border-color: #E066FF;
+ color: #E066FF;
+}
+
+.icinga-navbar-pills-down {
+ border-color: #FF3300;
+ color: #FF3300;
+}
+
+.icinga-navbar-pills-up {
+ border-color: #00CC33;
+ color: #00CC33;
+}