[icinga-checkins] icinga.org: icingaweb2/feature/livestatus-playground-4787: Livestatus\StatusQuery: make use of new filter flags

git at icinga.org git at icinga.org
Sun Nov 16 17:17:21 CET 2014


Module: icingaweb2
Branch: feature/livestatus-playground-4787
Commit: b494476ebc7e08e2c54db5a55c09e714d25cdd88
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=b494476ebc7e08e2c54db5a55c09e714d25cdd88

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sun Nov 16 16:39:41 2014 +0100

Livestatus\StatusQuery: make use of new filter flags

NIIIIICEEEE!!

---

 .../library/Monitoring/Backend/Livestatus/Query/StatusQuery.php |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/monitoring/library/Monitoring/Backend/Livestatus/Query/StatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Livestatus/Query/StatusQuery.php
index 16a4402..1fd02f6 100644
--- a/modules/monitoring/library/Monitoring/Backend/Livestatus/Query/StatusQuery.php
+++ b/modules/monitoring/library/Monitoring/Backend/Livestatus/Query/StatusQuery.php
@@ -33,6 +33,13 @@ class StatusQuery extends Query
 
     protected $table = 'services';
 
+    protected $filter_flags = array(
+        'host_handled'      => 'host_state > 0 & (host_acknowledged | host_in_downtime)',
+        'host_problem'      => 'host_state > 0',
+        'service_problem'   => 'service_state > 0',
+        'service_handled'   => 'service_state > 0 & (host_state > 0 | service_acknowledged | service_in_downtime)',
+        'service_unhandled' => 'service_state > 0 & host_state = 0 & !service_acknowledged & !service_in_downtime',
+    );
 
     protected $available_columns = array(
         'host'              => 'host_name',



More information about the icinga-checkins mailing list