monitoring: Remove next_update_is_late column from the host status query
refs #8378
This commit is contained in:
parent
fe1c6d33fa
commit
8347e126b8
|
@ -83,32 +83,13 @@ class HoststatusQuery extends IdoQuery
|
||||||
ELSE
|
ELSE
|
||||||
UNIX_TIMESTAMP(hs.last_check)
|
UNIX_TIMESTAMP(hs.last_check)
|
||||||
+ CASE WHEN
|
+ CASE WHEN
|
||||||
COALESCE(hs.current_state, 0) = 0
|
COALESCE(hs.current_state, 0) > 0 AND hs.state_type = 0
|
||||||
THEN
|
THEN
|
||||||
hs.normal_check_interval
|
|
||||||
ELSE
|
|
||||||
hs.retry_check_interval
|
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
|
ELSE
|
||||||
0
|
hs.normal_check_interval
|
||||||
END
|
END * 60
|
||||||
|
+ CEIL(hs.execution_time) * 2
|
||||||
END',
|
END',
|
||||||
'host_no_more_notifications' => 'hs.no_more_notifications',
|
'host_no_more_notifications' => 'hs.no_more_notifications',
|
||||||
'host_normal_check_interval' => 'hs.normal_check_interval',
|
'host_normal_check_interval' => 'hs.normal_check_interval',
|
||||||
|
|
Loading…
Reference in New Issue