From 1bfbb12e1b6ee71d126fe9e50c1f97533ee253ab Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 7 Feb 2020 13:17:40 +0100 Subject: [PATCH] Hoststatesummary: Don't count acknowledgments if their can't be any --- library/Icingadb/Model/HoststateSummary.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icingadb/Model/HoststateSummary.php b/library/Icingadb/Model/HoststateSummary.php index 36506a0b..25952120 100644 --- a/library/Icingadb/Model/HoststateSummary.php +++ b/library/Icingadb/Model/HoststateSummary.php @@ -12,7 +12,7 @@ class HoststateSummary extends Host parent::getColumns(), [ 'hosts_acknowledged' => new Expression( - 'SUM(CASE WHEN host_state.is_acknowledged = \'n\' THEN 0 ELSE 1 END)' + 'SUM(CASE WHEN host_state.is_acknowledged = \'y\' THEN 1 ELSE 0 END)' ), 'hosts_active_checks_enabled' => new Expression( 'SUM(CASE WHEN host.active_checks_enabled = \'y\' THEN 1 ELSE 0 END)'