From cd37f47d1bc703eeaf8167f58c7478f0961cf382 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 20 Aug 2013 23:55:02 +0200 Subject: [PATCH] Last/next check are timestamps, give NULL when it doesn't make sense --- .../library/Monitoring/Backend/Ido/Query/StatusQuery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php index b17e4962c..3808702ed 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php @@ -35,8 +35,8 @@ class StatusQuery extends AbstractQuery 'host_last_hard_state' => 'hs.last_hard_state', 'host_last_hard_state_change' => 'hs.last_hard_state_change', 'host_check_command' => 'hs.check_command', - 'host_last_check' => 'hs.last_check', - 'host_next_check' => 'hs.next_check', + 'host_last_check' => 'UNIX_TIMESTAMP(hs.last_check)', + 'host_next_check' => 'CASE hs.should_be_scheduled WHEN 1 THEN UNIX_TIMESTAMP(hs.next_check) ELSE NULL END', 'host_current_check_attempt' => 'hs.current_check_attempt', 'host_max_check_attempts' => 'hs.max_check_attempts', 'host_attempt' => 'hs.current_check_attempt || \'/\' || hs.max_check_attempts',