Adjust host severity
refs #2926 Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
parent
d1ff1d3872
commit
0b30fbd15d
|
@ -117,37 +117,28 @@ class HoststatusQuery extends IdoQuery
|
||||||
'host_process_performance_data' => 'hs.process_performance_data',
|
'host_process_performance_data' => 'hs.process_performance_data',
|
||||||
'host_retry_check_interval' => 'hs.retry_check_interval',
|
'host_retry_check_interval' => 'hs.retry_check_interval',
|
||||||
'host_scheduled_downtime_depth' => 'hs.scheduled_downtime_depth',
|
'host_scheduled_downtime_depth' => 'hs.scheduled_downtime_depth',
|
||||||
'host_severity' => 'CASE WHEN hs.current_state = 0
|
'host_severity' => '
|
||||||
THEN
|
CASE
|
||||||
CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL
|
WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL
|
||||||
THEN 16
|
THEN 16
|
||||||
ELSE 0
|
ELSE
|
||||||
END
|
CASE
|
||||||
+
|
WHEN hs.current_state = 0
|
||||||
CASE WHEN hs.problem_has_been_acknowledged = 1
|
THEN 1
|
||||||
THEN 2
|
ELSE
|
||||||
ELSE
|
CASE
|
||||||
CASE WHEN hs.scheduled_downtime_depth > 0
|
WHEN hs.current_state = 1 THEN 64
|
||||||
THEN 1
|
WHEN hs.current_state = 2 THEN 32
|
||||||
ELSE 4
|
ELSE 256
|
||||||
END
|
END
|
||||||
END
|
+
|
||||||
ELSE
|
CASE
|
||||||
CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 16
|
WHEN hs.problem_has_been_acknowledged = 1 THEN 2
|
||||||
WHEN hs.current_state = 1 THEN 64
|
WHEN hs.scheduled_downtime_depth > 0 THEN 1
|
||||||
WHEN hs.current_state = 2 THEN 32
|
ELSE 256
|
||||||
ELSE 256
|
|
||||||
END
|
|
||||||
+
|
|
||||||
CASE WHEN hs.problem_has_been_acknowledged = 1
|
|
||||||
THEN 2
|
|
||||||
ELSE
|
|
||||||
CASE WHEN hs.scheduled_downtime_depth > 0
|
|
||||||
THEN 1
|
|
||||||
ELSE 4
|
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
END',
|
END',
|
||||||
'host_state' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 99 ELSE hs.current_state END',
|
'host_state' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 99 ELSE hs.current_state END',
|
||||||
'host_state_type' => 'hs.state_type',
|
'host_state_type' => 'hs.state_type',
|
||||||
'host_status_update_time' => 'hs.status_update_time',
|
'host_status_update_time' => 'hs.status_update_time',
|
||||||
|
|
|
@ -101,37 +101,28 @@ class ServicestatusQuery extends IdoQuery
|
||||||
'host_process_performance_data' => 'hs.process_performance_data',
|
'host_process_performance_data' => 'hs.process_performance_data',
|
||||||
'host_retry_check_interval' => 'hs.retry_check_interval',
|
'host_retry_check_interval' => 'hs.retry_check_interval',
|
||||||
'host_scheduled_downtime_depth' => 'hs.scheduled_downtime_depth',
|
'host_scheduled_downtime_depth' => 'hs.scheduled_downtime_depth',
|
||||||
'host_severity' => 'CASE WHEN hs.current_state = 0
|
'host_severity' => '
|
||||||
THEN
|
CASE
|
||||||
CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL
|
WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL
|
||||||
THEN 16
|
THEN 16
|
||||||
ELSE 0
|
ELSE
|
||||||
END
|
CASE
|
||||||
+
|
WHEN hs.current_state = 0
|
||||||
CASE WHEN hs.problem_has_been_acknowledged = 1
|
THEN 1
|
||||||
THEN 2
|
ELSE
|
||||||
ELSE
|
CASE
|
||||||
CASE WHEN hs.scheduled_downtime_depth > 0
|
WHEN hs.current_state = 1 THEN 64
|
||||||
THEN 1
|
WHEN hs.current_state = 2 THEN 32
|
||||||
ELSE 4
|
ELSE 256
|
||||||
END
|
END
|
||||||
END
|
+
|
||||||
ELSE
|
CASE
|
||||||
CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 16
|
WHEN hs.problem_has_been_acknowledged = 1 THEN 2
|
||||||
WHEN hs.current_state = 1 THEN 32
|
WHEN hs.scheduled_downtime_depth > 0 THEN 1
|
||||||
WHEN hs.current_state = 2 THEN 64
|
ELSE 256
|
||||||
ELSE 256
|
|
||||||
END
|
|
||||||
+
|
|
||||||
CASE WHEN hs.problem_has_been_acknowledged = 1
|
|
||||||
THEN 2
|
|
||||||
ELSE
|
|
||||||
CASE WHEN hs.scheduled_downtime_depth > 0
|
|
||||||
THEN 1
|
|
||||||
ELSE 4
|
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
END',
|
END',
|
||||||
'host_state' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 99 ELSE hs.current_state END',
|
'host_state' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 99 ELSE hs.current_state END',
|
||||||
'host_state_type' => 'hs.state_type',
|
'host_state_type' => 'hs.state_type',
|
||||||
'host_status_update_time' => 'hs.status_update_time',
|
'host_status_update_time' => 'hs.status_update_time',
|
||||||
|
|
Loading…
Reference in New Issue