[icinga-checkins] icinga.org: icinga-web/next: Fix duplication problem in StatusSummary Cronk

git at icinga.org git at icinga.org
Mon May 6 17:15:01 CEST 2013


Module: icinga-web
Branch: next
Commit: b982b4f53a33b6ea1efb43eace9cf7bbd29d5157
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=b982b4f53a33b6ea1efb43eace9cf7bbd29d5157

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Tue Apr 30 17:44:21 2013 +0200

Fix duplication problem in StatusSummary Cronk

caused by 1-n credential joins

refs #3715
refs #4002

---

 app/modules/Api/config/views/overview.xml |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/modules/Api/config/views/overview.xml b/app/modules/Api/config/views/overview.xml
index ea17f18..52cf382 100644
--- a/app/modules/Api/config/views/overview.xml
+++ b/app/modules/Api/config/views/overview.xml
@@ -6,7 +6,7 @@
         <dql name="TARGET_SUMMARY_HOST" >
             <query>
             <![CDATA[
-            SELECT DISTINCT
+            SELECT
                 a.current_state,
                 a.has_been_checked,
                 a.should_be_scheduled,
@@ -14,7 +14,7 @@
                 a.problem_has_been_acknowledged,
                 a.passive_checks_enabled,
                 a.active_checks_enabled,
-                count(x.display_name) as count
+                count(DISTINCT x.host_object_id) as count
             FROM IcingaHosts x
             LEFT JOIN x.status a
             LEFT JOIN x.object o
@@ -63,7 +63,7 @@
         <dql name="TARGET_SUMMARY_SERVICE" >
             <query>
             <![CDATA[
-            SELECT DISTINCT
+            SELECT
                 a.current_state,
                 a.has_been_checked,
                 a.should_be_scheduled,
@@ -71,7 +71,7 @@
                 a.problem_has_been_acknowledged,
                 a.passive_checks_enabled,
                 a.active_checks_enabled,
-                count(x.display_name) as count,
+                count(DISTINCT x.service_object_id) as count,
                 hs.current_state,
                 hs.scheduled_downtime_depth,
                 hs.problem_has_been_acknowledged





More information about the icinga-checkins mailing list