[icinga-checkins] icinga.org: icinga-reports/support/1.6: fixes #2150

git at icinga.org git at icinga.org
Fri May 31 20:00:33 CEST 2013


Module: icinga-reports
Branch: support/1.6
Commit: 7d1bd15ee9bae3a2094f69a2d0d36d929cbd485a
URL:    https://git.icinga.org/?p=icinga-reports.git;a=commit;h=7d1bd15ee9bae3a2094f69a2d0d36d929cbd485a

Author: Bernd Erk <bernd.erk at icinga.org>
Date:   Wed May  9 12:25:25 2012 +0200

fixes #2150

---

 .../templates/sub/host/activityInGivenTime.jrxml   |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/jasperreports/templates/sub/host/activityInGivenTime.jrxml b/jasperreports/templates/sub/host/activityInGivenTime.jrxml
index c488c15..940c9a5 100644
--- a/jasperreports/templates/sub/host/activityInGivenTime.jrxml
+++ b/jasperreports/templates/sub/host/activityInGivenTime.jrxml
@@ -17,8 +17,10 @@
 			<![CDATA[select DATE_FORMAT(start_time, '%b %Y') date,
   state,
   count(*)
-from icinga_notifications
-where object_id = $P{p_object_id}
+from icinga_notifications, icinga_objects
+where icinga_notifications.object_id = $P{p_object_id}
+and icinga_objects.object_id = icinga_notifications.object_id
+and icinga_objects.is_active = 1
 and start_time between $P{p_date_start} and $P{p_date_end}
 group by month(start_time), state]]>
 		</queryString>
@@ -46,8 +48,10 @@ group by month(start_time), state]]>
 			<![CDATA[select DATE_FORMAT(state_time, '%b %Y')date,
   state,
   count(*)
-from icinga_statehistory
-where object_id = $P{p_object_id}
+from icinga_statehistory, icinga_objects
+where icinga_statehistory.object_id = $P{p_object_id}
+and icinga_objects.object_id = icinga_statehistory.object_id
+and icinga_objects.is_active = 1
 and state_time between $P{p_date_start} and $P{p_date_end}
 group by month(state_time), state]]>
 		</queryString>
@@ -75,8 +79,10 @@ group by month(state_time), state]]>
 			<![CDATA[select DATE_FORMAT(entry_time, '%b %Y') date,
   state,
   count(*)
-from icinga_acknowledgements
-where object_id = $P{p_object_id}
+from icinga_acknowledgements, icinga_objects
+where icinga_acknowledgements.object_id = $P{p_object_id}
+and icinga_objects.object_id = icinga_acknowledgements.object_id
+and icinga_objects.is_active = 1
 and entry_time between $P{p_date_start} and $P{p_date_end}
 group by month(entry_time), state]]>
 		</queryString>





More information about the icinga-checkins mailing list