mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-12 08:24:24 +02:00
commit
4be7f09a38
@ -499,6 +499,7 @@ class Monitoring_ListController extends Controller
|
|||||||
$this->setAutorefreshInterval(12);
|
$this->setAutorefreshInterval(12);
|
||||||
$query = $this->backend->select()->from('groupsummary', array(
|
$query = $this->backend->select()->from('groupsummary', array(
|
||||||
'servicegroup',
|
'servicegroup',
|
||||||
|
'servicegroup_alias',
|
||||||
'hosts_up',
|
'hosts_up',
|
||||||
'hosts_unreachable_handled',
|
'hosts_unreachable_handled',
|
||||||
'hosts_unreachable_unhandled',
|
'hosts_unreachable_unhandled',
|
||||||
@ -546,6 +547,7 @@ class Monitoring_ListController extends Controller
|
|||||||
$this->setAutorefreshInterval(12);
|
$this->setAutorefreshInterval(12);
|
||||||
$query = $this->backend->select()->from('groupsummary', array(
|
$query = $this->backend->select()->from('groupsummary', array(
|
||||||
'hostgroup',
|
'hostgroup',
|
||||||
|
'hostgroup_alias',
|
||||||
'hosts_up',
|
'hosts_up',
|
||||||
'hosts_unreachable_handled',
|
'hosts_unreachable_handled',
|
||||||
'hosts_unreachable_unhandled',
|
'hosts_unreachable_unhandled',
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<td class="groupname">
|
<td class="groupname">
|
||||||
<a href="<?= $this->href('monitoring/list/hosts', array('hostgroup' => $h->hostgroup)); ?>">
|
<a href="<?= $this->href('monitoring/list/hosts', array('hostgroup' => $h->hostgroup)); ?>">
|
||||||
<?= $h->hostgroup; ?>
|
<?= $this->escape($h->hostgroup_alias) ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="total">
|
<td class="total">
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<td class="groupname">
|
<td class="groupname">
|
||||||
<a href="<?= $this->href('monitoring/list/services', array('servicegroup' => $s->servicegroup)); ?>">
|
<a href="<?= $this->href('monitoring/list/services', array('servicegroup' => $s->servicegroup)); ?>">
|
||||||
<?= $s->servicegroup; ?>
|
<?= $this->translate($s->servicegroup_alias) ?>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="total">
|
<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_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_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)',
|
'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(
|
'servicestatussummary' => array(
|
||||||
'services_total' => 'SUM(CASE WHEN object_type = \'service\' THEN 1 ELSE 0 END)',
|
'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_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_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)',
|
'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(
|
$columns = array(
|
||||||
'object_type',
|
'object_type',
|
||||||
'host_state',
|
'host_state'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Prepend group column since we'll use columns index 0 later for grouping
|
// Prepend group column since we'll use columns index 0 later for grouping
|
||||||
@ -61,6 +63,12 @@ class GroupSummaryQuery extends IdoQuery
|
|||||||
} else {
|
} else {
|
||||||
array_unshift($columns, 'hostgroup');
|
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(
|
$hosts = $this->createSubQuery(
|
||||||
'Hoststatus',
|
'Hoststatus',
|
||||||
$columns + array(
|
$columns + array(
|
||||||
|
@ -85,9 +85,11 @@ class HoststatusQuery extends IdoQuery
|
|||||||
),
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||||
|
'hostgroup_alias' => 'hg.alias'
|
||||||
),
|
),
|
||||||
'servicegroups' => array(
|
'servicegroups' => array(
|
||||||
'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci',
|
'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci',
|
||||||
|
'servicegroup_alias' => 'sg.alias'
|
||||||
),
|
),
|
||||||
'contactgroups' => array(
|
'contactgroups' => array(
|
||||||
'contactgroup' => 'contactgroup',
|
'contactgroup' => 'contactgroup',
|
||||||
|
@ -160,10 +160,12 @@ class StatusQuery extends IdoQuery
|
|||||||
END'
|
END'
|
||||||
),
|
),
|
||||||
'hostgroups' => array(
|
'hostgroups' => array(
|
||||||
'hostgroup' => 'hgo.name1',
|
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||||
|
'hostgroup_alias' => 'hg.alias'
|
||||||
),
|
),
|
||||||
'servicegroups' => array(
|
'servicegroups' => array(
|
||||||
'servicegroup' => 'sgo.name1',
|
'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci',
|
||||||
|
'servicegroup_alias' => 'sg.alias'
|
||||||
),
|
),
|
||||||
'services' => array(
|
'services' => array(
|
||||||
'service_host_name' => 'so.name1 COLLATE latin1_general_ci',
|
'service_host_name' => 'so.name1 COLLATE latin1_general_ci',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user