From 4dc2eb9f4a2a0f1c240b274b379505798df34781 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 5 Jun 2015 15:01:08 +0200 Subject: [PATCH] monitoring: Use soft states in the host status summary query again refs #9009 --- .../Backend/Ido/Query/HoststatussummaryQuery.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatussummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatussummaryQuery.php index aed8c20ea..da065d184 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatussummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HoststatussummaryQuery.php @@ -16,12 +16,12 @@ class HoststatussummaryQuery extends IdoQuery protected $columnMap = array( 'hoststatussummary' => array( 'hosts_down' => 'SUM(CASE WHEN state = 1 THEN 1 ELSE 0 END)', - 'hosts_down_handled' => 'SUM(CASE WHEN state = 1 AND handled != 0 THEN 1 ELSE 0 END)', + 'hosts_down_handled' => 'SUM(CASE WHEN state = 1 AND handled = 1 THEN 1 ELSE 0 END)', 'hosts_down_unhandled' => 'SUM(CASE WHEN state = 1 AND handled = 0 THEN 1 ELSE 0 END)', 'hosts_pending' => 'SUM(CASE WHEN state = 99 THEN 1 ELSE 0 END)', 'hosts_total' => 'SUM(1)', 'hosts_unreachable' => 'SUM(CASE WHEN state = 2 THEN 1 ELSE 0 END)', - 'hosts_unreachable_handled' => 'SUM(CASE WHEN state = 2 AND handled != 0 THEN 1 ELSE 0 END)', + 'hosts_unreachable_handled' => 'SUM(CASE WHEN state = 2 AND handled = 1 THEN 1 ELSE 0 END)', 'hosts_unreachable_unhandled' => 'SUM(CASE WHEN state = 2 AND handled = 0 THEN 1 ELSE 0 END)', 'hosts_up' => 'SUM(CASE WHEN state = 0 THEN 1 ELSE 0 END)' ) @@ -53,8 +53,8 @@ class HoststatussummaryQuery extends IdoQuery 'Hoststatus', array( 'handled' => 'host_handled', - 'state' => 'host_hard_state', - 'state_change' => 'host_last_hard_state_change' + 'state' => 'host_state', + 'state_change' => 'host_last_state_change' ) ); $this->select->from(