GroupsummaryQuery: add column `hosts_total'

refs #8054
This commit is contained in:
Alexander A. Klimov 2015-05-13 18:10:18 +02:00
parent 7e1f9f6dcc
commit ead0a64244
2 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ class GroupSummaryQuery extends IdoQuery
protected $columnMap = array(
'hoststatussummary' => array(
'hosts_total' => 'SUM(CASE WHEN object_type = \'host\' THEN 1 ELSE 0 END)',
'hosts_up' => 'SUM(CASE WHEN object_type = \'host\' AND state = 0 THEN 1 ELSE 0 END)',
'hosts_unreachable' => 'SUM(CASE WHEN object_type = \'host\' AND state = 2 THEN 1 ELSE 0 END)',
'hosts_unreachable_handled' => 'SUM(CASE WHEN object_type = \'host\' AND state = 2 AND acknowledged + in_downtime != 0 THEN 1 ELSE 0 END)',

View File

@ -17,6 +17,7 @@ class Groupsummary extends DataView
'servicegroup_alias',
'hostgroup_name',
'hostgroup_alias',
'hosts_total',
'hosts_up',
'hosts_unreachable',
'hosts_unreachable_handled',