Monitoring/Ido/Service Status: Add unhandled, handled and problems columns

This commit is contained in:
Eric Lippmann 2013-10-23 15:13:02 +02:00
parent ca1d50ae53
commit 4e9e5ca2dc
1 changed files with 3 additions and 0 deletions

View File

@ -172,6 +172,9 @@ class StatusQuery extends IdoQuery
'object_type' => '(\'service\')'
),
'servicestatus' => array(
'handled' => 'CASE WHEN (ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth + COALESCE(hs.current_state, 0)) > 0 THEN 1 ELSE 0 END',
'unhandled' => 'CASE WHEN (ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth + COALESCE(hs.current_state, 0)) = 0 THEN 1 ELSE 0 END',
'problems' => 'CASE WHEN ss.current_state = 0 THEN 0 ELSE 1 END',
'service_state' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 99 ELSE ss.current_state END',
'service_hard_state' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 99 ELSE CASE WHEN ss.state_type = 1 THEN ss.current_state ELSE ss.last_hard_state END END',
'service_state_type' => 'ss.state_type',