Merge pull request #3956 from Icinga/bugfix/checks-wrongly-marked-as-late-3696
Fix checks being marked as late when they are scheduled for later time
This commit is contained in:
commit
25e1942a9b
|
@ -101,17 +101,17 @@ class HoststatusQuery extends IdoQuery
|
|||
'host_next_notification' => 'UNIX_TIMESTAMP(hs.next_notification)',
|
||||
'host_next_update' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL
|
||||
THEN
|
||||
NULL
|
||||
CASE hs.should_be_scheduled WHEN 1 THEN UNIX_TIMESTAMP(hs.next_check) + (hs.normal_check_interval * 60) ELSE NULL END
|
||||
ELSE
|
||||
UNIX_TIMESTAMP(hs.last_check)
|
||||
UNIX_TIMESTAMP(hs.next_check)
|
||||
+ (CASE WHEN
|
||||
COALESCE(hs.current_state, 0) > 0 AND hs.state_type = 0
|
||||
THEN
|
||||
hs.retry_check_interval
|
||||
ELSE
|
||||
hs.normal_check_interval
|
||||
END * 60
|
||||
+ CEIL(hs.execution_time) + CEIL(hs.latency)) * 2
|
||||
END * 60)
|
||||
+ (CEIL(hs.execution_time + hs.latency) * 2)
|
||||
END',
|
||||
'host_no_more_notifications' => 'hs.no_more_notifications',
|
||||
'host_normal_check_interval' => 'hs.normal_check_interval',
|
||||
|
|
|
@ -213,17 +213,17 @@ class ServicestatusQuery extends IdoQuery
|
|||
'service_next_notification' => 'UNIX_TIMESTAMP(ss.next_notification)',
|
||||
'service_next_update' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL
|
||||
THEN
|
||||
NULL
|
||||
CASE ss.should_be_scheduled WHEN 1 THEN UNIX_TIMESTAMP(ss.next_check) + (ss.normal_check_interval * 60) ELSE NULL END
|
||||
ELSE
|
||||
UNIX_TIMESTAMP(ss.last_check)
|
||||
UNIX_TIMESTAMP(ss.next_check)
|
||||
+ (CASE WHEN
|
||||
COALESCE(ss.current_state, 0) > 0 AND ss.state_type = 0
|
||||
THEN
|
||||
ss.retry_check_interval
|
||||
ELSE
|
||||
ss.normal_check_interval
|
||||
END * 60
|
||||
+ CEIL(ss.execution_time) + CEIL(ss.latency)) * 2
|
||||
END * 60)
|
||||
+ (CEIL(ss.execution_time + ss.latency) * 2)
|
||||
END',
|
||||
'service_no_more_notifications' => 'ss.no_more_notifications',
|
||||
'service_normal_check_interval' => 'ss.normal_check_interval',
|
||||
|
|
Loading…
Reference in New Issue