commit
4be7f09a38
|
@ -499,6 +499,7 @@ class Monitoring_ListController extends Controller
|
|||
$this->setAutorefreshInterval(12);
|
||||
$query = $this->backend->select()->from('groupsummary', array(
|
||||
'servicegroup',
|
||||
'servicegroup_alias',
|
||||
'hosts_up',
|
||||
'hosts_unreachable_handled',
|
||||
'hosts_unreachable_unhandled',
|
||||
|
@ -546,6 +547,7 @@ class Monitoring_ListController extends Controller
|
|||
$this->setAutorefreshInterval(12);
|
||||
$query = $this->backend->select()->from('groupsummary', array(
|
||||
'hostgroup',
|
||||
'hostgroup_alias',
|
||||
'hosts_up',
|
||||
'hosts_unreachable_handled',
|
||||
'hosts_unreachable_unhandled',
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<?php endif ?>
|
||||
<td class="groupname">
|
||||
<a href="<?= $this->href('monitoring/list/hosts', array('hostgroup' => $h->hostgroup)); ?>">
|
||||
<?= $h->hostgroup; ?>
|
||||
<?= $this->escape($h->hostgroup_alias) ?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="total">
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<?php endif ?>
|
||||
<td class="groupname">
|
||||
<a href="<?= $this->href('monitoring/list/services', array('servicegroup' => $s->servicegroup)); ?>">
|
||||
<?= $s->servicegroup; ?>
|
||||
<?= $this->translate($s->servicegroup_alias) ?>
|
||||
</a>
|
||||
</td>
|
||||
<td class="total">
|
||||
|
|
|
@ -20,7 +20,8 @@ class GroupSummaryQuery extends IdoQuery
|
|||
'hosts_down_handled' => 'SUM(CASE WHEN object_type = \'host\' AND state = 1 AND acknowledged + in_downtime != 0 THEN 1 ELSE 0 END)',
|
||||
'hosts_down_unhandled' => 'SUM(CASE WHEN object_type = \'host\' AND state = 1 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)',
|
||||
'hosts_pending' => 'SUM(CASE WHEN object_type = \'host\' AND state = 99 THEN 1 ELSE 0 END)',
|
||||
'hostgroup' => 'hostgroup'
|
||||
'hostgroup' => 'hostgroup',
|
||||
'hostgroup_alias' => 'hostgroup_alias'
|
||||
),
|
||||
'servicestatussummary' => array(
|
||||
'services_total' => 'SUM(CASE WHEN object_type = \'service\' THEN 1 ELSE 0 END)',
|
||||
|
@ -44,7 +45,8 @@ class GroupSummaryQuery extends IdoQuery
|
|||
'services_warning_last_state_change_unhandled' => 'MAX(CASE WHEN object_type = \'service\' AND state = 1 AND acknowledged + in_downtime + host_state = 0 THEN state_change ELSE 0 END)',
|
||||
'services_critical_last_state_change_unhandled' => 'MAX(CASE WHEN object_type = \'service\' AND state = 2 AND acknowledged + in_downtime + host_state = 0 THEN state_change ELSE 0 END)',
|
||||
'services_unknown_last_state_change_unhandled' => 'MAX(CASE WHEN object_type = \'service\' AND state = 3 AND acknowledged + in_downtime + host_state = 0 THEN state_change ELSE 0 END)',
|
||||
'servicegroup' => 'servicegroup'
|
||||
'servicegroup' => 'servicegroup',
|
||||
'servicegroup_alias' => 'servicegroup_alias'
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -52,7 +54,7 @@ class GroupSummaryQuery extends IdoQuery
|
|||
{
|
||||
$columns = array(
|
||||
'object_type',
|
||||
'host_state',
|
||||
'host_state'
|
||||
);
|
||||
|
||||
// Prepend group column since we'll use columns index 0 later for grouping
|
||||
|
@ -61,6 +63,12 @@ class GroupSummaryQuery extends IdoQuery
|
|||
} else {
|
||||
array_unshift($columns, 'hostgroup');
|
||||
}
|
||||
if (in_array('hostgroup_alias', $this->desiredColumns)) {
|
||||
$columns[] = 'hostgroup_alias';
|
||||
}
|
||||
if (in_array('servicegroup_alias', $this->desiredColumns)) {
|
||||
$columns[] = 'servicegroup_alias';
|
||||
}
|
||||
$hosts = $this->createSubQuery(
|
||||
'Hoststatus',
|
||||
$columns + array(
|
||||
|
|
|
@ -85,9 +85,11 @@ class HoststatusQuery extends IdoQuery
|
|||
),
|
||||
'hostgroups' => array(
|
||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||
'hostgroup_alias' => 'hg.alias'
|
||||
),
|
||||
'servicegroups' => array(
|
||||
'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci',
|
||||
'servicegroup_alias' => 'sg.alias'
|
||||
),
|
||||
'contactgroups' => array(
|
||||
'contactgroup' => 'contactgroup',
|
||||
|
|
|
@ -160,10 +160,12 @@ class StatusQuery extends IdoQuery
|
|||
END'
|
||||
),
|
||||
'hostgroups' => array(
|
||||
'hostgroup' => 'hgo.name1',
|
||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||
'hostgroup_alias' => 'hg.alias'
|
||||
),
|
||||
'servicegroups' => array(
|
||||
'servicegroup' => 'sgo.name1',
|
||||
'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci',
|
||||
'servicegroup_alias' => 'sg.alias'
|
||||
),
|
||||
'services' => array(
|
||||
'service_host_name' => 'so.name1 COLLATE latin1_general_ci',
|
||||
|
|
Loading…
Reference in New Issue