monitoring: Remove next_update_is_late column from the host status query

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

View File

@ -83,32 +83,13 @@ class HoststatusQuery extends IdoQuery
ELSE
UNIX_TIMESTAMP(hs.last_check)
+ CASE WHEN
COALESCE(hs.current_state, 0) = 0
COALESCE(hs.current_state, 0) > 0 AND hs.state_type = 0
THEN
hs.normal_check_interval
ELSE
hs.retry_check_interval
END * 60
+ FLOOR(hs.execution_time) * 2
END',
// TODO(el): Remove column once we support host_next_update>now
'host_next_update_is_late' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL
THEN
0
ELSE
CASE WHEN (UNIX_TIMESTAMP(hs.last_check)
+ CASE WHEN COALESCE(hs.current_state, 0) = 0
THEN
hs.normal_check_interval
ELSE
hs.retry_check_interval
END * 60
+ FLOOR(hs.execution_time) * 2) > CURRENT_TIMESTAMP()
THEN
1
ELSE
0
END
hs.normal_check_interval
END * 60
+ CEIL(hs.execution_time) * 2
END',
'host_no_more_notifications' => 'hs.no_more_notifications',
'host_normal_check_interval' => 'hs.normal_check_interval',