mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 05:44:36 +02:00
Fix Queries: Summaries, Host, Service
This commit is contained in:
parent
97d2a920db
commit
a0122763a6
@ -44,7 +44,6 @@ class GroupSummaryQuery extends IdoQuery
|
|||||||
$columns = array(
|
$columns = array(
|
||||||
'object_type',
|
'object_type',
|
||||||
'host_state',
|
'host_state',
|
||||||
'host_name'
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// 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 +60,9 @@ class GroupSummaryQuery extends IdoQuery
|
|||||||
'in_downtime' => 'host_in_downtime'
|
'in_downtime' => 'host_in_downtime'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
if (in_array('servicegroup', $this->desiredColumns)) {
|
||||||
|
$hosts->group(array('sgo.name1', 'ho.object_id', 'state', 'acknowledged', 'in_downtime'));
|
||||||
|
}
|
||||||
$services = $this->createSubQuery(
|
$services = $this->createSubQuery(
|
||||||
'Status',
|
'Status',
|
||||||
$columns + array(
|
$columns + array(
|
||||||
|
@ -64,7 +64,8 @@ class HostStatus extends DataView
|
|||||||
'host_percent_state_change',
|
'host_percent_state_change',
|
||||||
'host_modified_host_attributes',
|
'host_modified_host_attributes',
|
||||||
'host_severity',
|
'host_severity',
|
||||||
'host_problem'
|
'host_problem',
|
||||||
|
'host_ipv4'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +106,7 @@ class HostStatus extends DataView
|
|||||||
|
|
||||||
public function getFilterColumns()
|
public function getFilterColumns()
|
||||||
{
|
{
|
||||||
return array('hostgroup', 'service_problems');
|
return array('hostgroup', 'service_problems', 'servicegroup');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isValidFilterTarget($column)
|
public function isValidFilterTarget($column)
|
||||||
|
@ -101,6 +101,7 @@ class ServiceStatus extends DataView
|
|||||||
'service_flap_detection_enabled',
|
'service_flap_detection_enabled',
|
||||||
'service_flap_detection_enabled_changed',
|
'service_flap_detection_enabled_changed',
|
||||||
'service_modified_service_attributes',
|
'service_modified_service_attributes',
|
||||||
|
'service_host_name'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,8 @@ class Service extends MonitoredObject
|
|||||||
'service_flap_detection_enabled_changed',
|
'service_flap_detection_enabled_changed',
|
||||||
'service_modified_service_attributes',
|
'service_modified_service_attributes',
|
||||||
'service_process_performance_data',
|
'service_process_performance_data',
|
||||||
'service_percent_state_change'
|
'service_percent_state_change',
|
||||||
|
'service_host_name'
|
||||||
))
|
))
|
||||||
->where('host_name', $this->host->getName())
|
->where('host_name', $this->host->getName())
|
||||||
->where('service_description', $this->service);
|
->where('service_description', $this->service);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user