From 344a99bbb88bbf8c87dd7c19b493be75a99b4e48 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 21 Aug 2013 00:03:36 +0200 Subject: [PATCH] service_hard_state is the current hard state --- .../library/Monitoring/Backend/Ido/Query/StatusQuery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php index a63e97114..aeb130ec2 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php @@ -122,6 +122,8 @@ class StatusQuery extends AbstractQuery ), 'servicestatus' => array( 'service_state' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 99 ELSE ss.current_state END', + 'service_hard_state' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 99 ELSE CASE WHEN ss.state_type = 1 THEN ss.current_state ELSE ss.last_hard_state END END', + 'service_state_type' => 'ss.state_type', 'service_output' => 'ss.output', 'service_long_output' => 'ss.long_output', 'service_perfdata' => 'ss.perfdata', @@ -144,7 +146,6 @@ class StatusQuery extends AbstractQuery 'service_check_type' => 'ss.check_type', 'service_last_hard_state_change' => 'ss.last_hard_state_change', 'service_last_hard_state' => 'ss.last_hard_state', - 'service_state_type' => 'ss.state_type', 'service_last_notification' => 'ss.last_notification', 'service_next_notification' => 'ss.next_notification', 'service_no_more_notifications' => 'ss.no_more_notifications',