monitoring: Remove next_update_is_late column from the service status query

refs #8378
This commit is contained in:
Eric Lippmann 2015-09-07 11:06:02 +02:00
parent 8347e126b8
commit 30a5f57b7d
1 changed files with 4 additions and 23 deletions

View File

@ -200,32 +200,13 @@ class ServicestatusQuery extends IdoQuery
ELSE
UNIX_TIMESTAMP(ss.last_check)
+ CASE WHEN
COALESCE(ss.current_state, 0) = 0
COALESCE(ss.current_state, 0) > 0 AND ss.state_type = 0
THEN
ss.normal_check_interval
ELSE
ss.retry_check_interval
END * 60
+ FLOOR(ss.execution_time) * 2
END',
// TODO(el): Remove column once we support service_next_update>now
'service_next_update_is_late' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL
THEN
0
ELSE
CASE WHEN (UNIX_TIMESTAMP(ss.last_check)
+ CASE WHEN COALESCE(ss.current_state, 0) = 0
THEN
ss.normal_check_interval
ELSE
ss.retry_check_interval
END * 60
+ FLOOR(ss.execution_time) * 2) > CURRENT_TIMESTAMP()
THEN
1
ELSE
0
END
ss.normal_check_interval
END * 60
+ CEIL(ss.execution_time) * 2
END',
'service_no_more_notifications' => 'ss.no_more_notifications',
'service_normal_check_interval' => 'ss.normal_check_interval',