[icinga-checkins] icinga.org: icinga-api/master: * Downtime query fix (mysql)

git at icinga.org git at icinga.org
Mon Jan 17 16:30:48 CET 2011


Module: icinga-api
Branch: master
Commit: b412789611d5b63003f3abc61db34873196d9eff
URL:    https://git.icinga.org/?p=icinga-api.git;a=commit;h=b412789611d5b63003f3abc61db34873196d9eff

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Jan 17 16:30:31 2011 +0100

* Downtime query fix (mysql)

---

 .../data_interfaces/IcingaApiSearchIdoMysql.php    |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php b/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
index 0f4c9a4..3c7c75d 100644
--- a/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
+++ b/objects/search/data_interfaces/IcingaApiSearchIdoMysql.php
@@ -415,7 +415,10 @@ implements IcingaApiSearchIdoInterface {
 			
 			${if_table:i,dt:left join ${TABLE_PREFIX}instances i on i.instance_id = dt.instance_id}
 			
-			where not dt.actual_end_time and not dt.was_cancelled
+			where
+				not dt.actual_end_time 
+				and not dt.was_cancelled
+				and (not dt.was_started=0 and dt.scheduled_start_time >= NOW())
 			
 			${FILTER_AND}
 			${GROUPBY}





More information about the icinga-checkins mailing list