From 781fb394acc9f8538c76d0c2f3e288e629e6d288 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 21 Aug 2013 00:01:37 +0200 Subject: [PATCH] More cleanup, timestamp fixes --- .../Monitoring/Backend/Ido/Query/StatusQuery.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php index 3808702ed..80d552d40 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php @@ -33,22 +33,25 @@ class StatusQuery extends AbstractQuery 'host_accepts_passive_checks' => 'hs.passive_checks_enabled', 'host_last_state_change' => 'UNIX_TIMESTAMP(hs.last_state_change)', 'host_last_hard_state' => 'hs.last_hard_state', - 'host_last_hard_state_change' => 'hs.last_hard_state_change', + 'host_last_hard_state_change' => 'UNIX_TIMESTAMP(hs.last_hard_state_change)', 'host_check_command' => 'hs.check_command', '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_check_execution_time' => 'hs.execution_time', + 'host_check_latency' => 'hs.latency', + 'host_problem' => 'CASE WHEN hs.current_state = 0 THEN 0 ELSE 1 END', + 'host_notifications_enabled' => 'hs.notifications_enabled', + 'host_last_time_up' => 'UNIX_TIMESTAMP(hs.last_time_up)', + 'host_last_time_down' => 'UNIX_TIMESTAMP(hs.last_time_down)', + 'host_last_time_unreachable' => 'UNIX_TIMESTAMP(hs.last_time_unreachable)', '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', 'host_check_type' => 'hs.check_type', - 'host_last_time_up' => 'hs.last_time_up', - 'host_last_time_down' => 'hs.last_time_down', - 'host_last_time_unreachable' => 'hs.last_time_unreachable', 'host_state_type' => 'hs.state_type', 'host_last_notification' => 'hs.last_notification', 'host_next_notification' => 'hs.next_notification', 'host_no_more_notifications' => 'hs.no_more_notifications', - 'host_notifications_enabled' => 'hs.notifications_enabled', 'host_problem_has_been_acknowledged' => 'hs.problem_has_been_acknowledged', 'host_acknowledgement_type' => 'hs.acknowledgement_type', 'host_current_notification_number' => 'hs.current_notification_number', @@ -58,8 +61,6 @@ class StatusQuery extends AbstractQuery 'host_flap_detection_enabled' => 'hs.flap_detection_enabled', 'host_is_flapping' => 'hs.is_flapping', 'host_percent_state_change' => 'hs.percent_state_change', - 'host_check_latency' => 'hs.latency', - 'host_check_execution_time' => 'hs.execution_time', 'host_scheduled_downtime_depth' => 'hs.scheduled_downtime_depth', 'host_failure_prediction_enabled' => 'hs.failure_prediction_enabled', 'host_process_performance_data' => 'hs.process_performance_data', @@ -71,7 +72,6 @@ class StatusQuery extends AbstractQuery 'host_retry_check_interval' => 'hs.retry_check_interval', 'host_check_timeperiod_object_id' => 'hs.check_timeperiod_object_id', 'host_status_update_time' => 'hs.status_update_time', - 'host_problem' => 'CASE WHEN hs.current_state = 0 THEN 0 ELSE 1 END', 'host_severity' => 'CASE WHEN hs.current_state = 0 THEN CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL