From f6b5f5d4056563165ab72c6a7a4d462638b17456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannis=20Mo=C3=9Fhammer?= Date: Mon, 3 Jun 2013 16:36:10 +0200 Subject: [PATCH] Add tested Backend ressource Only statusdat is currently tested refs #4212 --- library/Icinga/Backend/AbstractBackend.php | 95 ++++++++ library/Icinga/Backend/Criteria/Filter.php | 46 ++++ library/Icinga/Backend/Criteria/Order.php | 35 +++ .../DataView/AbstractAccessorStrategy.php | 45 ++++ .../Backend/DataView/ObjectRemappingView.php | 100 ++++++++ library/Icinga/Backend/Query.php | 66 ++++++ library/Icinga/Backend/Statusdat.php | 58 +++++ .../Statusdat/DataView/StatusdatHostView.php | 48 ++++ .../DataView/StatusdatServiceView.php | 62 +++++ .../Backend/Statusdat/GroupsummaryQuery.php | 139 ++++++++++++ .../Statusdat/HostgroupsummaryQuery.php | 10 + .../Backend/Statusdat/HostlistQuery.php | 29 +++ library/Icinga/Backend/Statusdat/Query.php | 214 ++++++++++++++++++ .../Statusdat/ServicegroupsummaryQuery.php | 10 + .../Backend/Statusdat/ServicelistQuery.php | 32 +++ .../.ServicegroupsummaryQueryTest.php.swp | Bin 0 -> 20480 bytes .../ServicegroupsummaryQueryTest.php | 14 +- 17 files changed, 996 insertions(+), 7 deletions(-) create mode 100755 library/Icinga/Backend/AbstractBackend.php create mode 100755 library/Icinga/Backend/Criteria/Filter.php create mode 100755 library/Icinga/Backend/Criteria/Order.php create mode 100755 library/Icinga/Backend/DataView/AbstractAccessorStrategy.php create mode 100755 library/Icinga/Backend/DataView/ObjectRemappingView.php create mode 100755 library/Icinga/Backend/Query.php create mode 100755 library/Icinga/Backend/Statusdat.php create mode 100644 library/Icinga/Backend/Statusdat/DataView/StatusdatHostView.php create mode 100755 library/Icinga/Backend/Statusdat/DataView/StatusdatServiceView.php create mode 100755 library/Icinga/Backend/Statusdat/GroupsummaryQuery.php create mode 100755 library/Icinga/Backend/Statusdat/HostgroupsummaryQuery.php create mode 100755 library/Icinga/Backend/Statusdat/HostlistQuery.php create mode 100644 library/Icinga/Backend/Statusdat/Query.php create mode 100644 library/Icinga/Backend/Statusdat/ServicegroupsummaryQuery.php create mode 100755 library/Icinga/Backend/Statusdat/ServicelistQuery.php create mode 100644 tests/php/library/Icinga/Backend/Statusdat/.ServicegroupsummaryQueryTest.php.swp diff --git a/library/Icinga/Backend/AbstractBackend.php b/library/Icinga/Backend/AbstractBackend.php new file mode 100755 index 000000000..2c62adbec --- /dev/null +++ b/library/Icinga/Backend/AbstractBackend.php @@ -0,0 +1,95 @@ +config exists. Config is a Zend_Config + * object right now, only the main Config is an Icinga one + * + * return void + */ + final public function __construct(\Zend_Config $config = null) + { + if ($config == null) + $config = new \Zend_Config(array()); + $this->config = $config; + $this->init(); + } + + /** + * Override this function for initialization tasks + * + * return void + */ + protected function init() {} + + /** + * Dummy function for fluent code + * + * return \Icinga\Backend\Ido + */ + public function select() + { + return $this; + } + + /** + * Create a Query object instance for given virtual table and desired fields + * + * Leave fields empty to get all available properties + * + * @param string Virtual table name + * @param array Fields + * return \Icinga\Backend\Ido\Query + */ + public function from($virtual_table, $fields = array()) + { + $classname = $this->tableToClassName($virtual_table); + if (! class_exists($classname)) { + throw new \Exception(sprintf('Asking for invalid virtual table %s', $classname)); + } + $query = new $classname($this, $fields); + return $query; + } + + public function hasView($virtual_table) + { + return class_exists($this->tableToClassName($virtual_table)); + } + + protected function tableToClassName($virtual_table) + { + if (strpos($virtual_table,"/") !== false) { + list($module, $classname) = explode("/",$virtual_table,2); + $class = array_pop(explode("\\",get_class($this))); + return 'Icinga\\'.ucfirst($module).'\\Backend\\'.$class.'\\'.ucfirst($classname).'Query'; + } else { + return get_class($this) . '\\' . ucfirst($virtual_table . 'Query'); + } + } + + public function getName() + { + return preg_replace('~^.+\\\(.+?)$~', '$1', get_class($this)); + } + + public function __toString() + { + return $this->getName(); + } + +} + diff --git a/library/Icinga/Backend/Criteria/Filter.php b/library/Icinga/Backend/Criteria/Filter.php new file mode 100755 index 000000000..2bc47ab92 --- /dev/null +++ b/library/Icinga/Backend/Criteria/Filter.php @@ -0,0 +1,46 @@ +unknown->warning->ok, + * but also might take acknowledgments and downtimes in account + */ + const SERVICE_STATE = "service_state"; + + /** + * Order by the state of host objects. Mostly this is critical->unknown->warning->ok, + * but also might take acknowledgments and downtimes in account + */ + const HOST_STATE = "host_state"; + + const HOST_NAME = "host_name"; + const SERVICE_NAME = "service_description"; +} + diff --git a/library/Icinga/Backend/DataView/AbstractAccessorStrategy.php b/library/Icinga/Backend/DataView/AbstractAccessorStrategy.php new file mode 100755 index 000000000..7fbf56106 --- /dev/null +++ b/library/Icinga/Backend/DataView/AbstractAccessorStrategy.php @@ -0,0 +1,45 @@ +service_state, + * because this field is, e.g. under status.current_state in the status.dat view, while IDO uses servicestate->current_state. + * + * This view is intended for normalizing these changes, so a request of service_state returns the right field for the backend. + * When implementing it, you have to fill the mappedParameters and/or the handlerParameters array. While mappedParameters + * simply translate logic field names to storage specific ones, handlerParameters determins functions that handle data + * retrieval for the specific fields. + * + */ +class ObjectRemappingView implements AbstractAccessorStrategy +{ + + /** + * When implementing your own Mapper, this contains the static mapping rules. + * @see Icinga\Backend\Statusdat\DataView\StatusdatServiceView for an example + * + * @var array + */ + protected $mappedParameters = array(); + + /** + * When implementing your own Mapper, this contains the handler for specific fields and allows you to lazy load + * different fields if necessary. The methods are strings that will be mapped to methods of this class + * + * @see Icinga\Backend\Statusdat\DataView\StatusdatServiceView for an example + * + * @var array + */ + protected $handlerParameters = array(); + + /** + * + * @see Icinga\Backend\DataView\AbstractAccessorStrategy + * + * @param The $item + * @param The $field + * @return The|string + * @throws \InvalidArgumentException + */ + public function get(&$item, $field) + { + + if (isset($item->$field)) + return $item->$field; + if (isset($this->mappedParameters[$field])) { + $mapped = explode(".",$this->mappedParameters[$field]); + $res = $item; + + foreach($mapped as $map) { + if(!isset($res->$map)) + return ""; + $res = $res->$map; + } + return $res; + } + + if (isset($this->handlerParameters[$field])) { + $hdl = $this->handlerParameters[$field]; + return $this->$hdl($item); + } + throw new \InvalidArgumentException("Field $field does not exist for status.dat services"); + } + + /** + * + * @see Icinga\Backend\DataView\AbstractAccessorStrategy + * + * @param The $field + * @return The|string + */ + public function getNormalizedFieldName($field) + { + if(isset($this->mappedParameters[$field])) + return $this->mappedParameters[$field]; + return $field; + } + + /** + * + * @see Icinga\Backend\DataView\AbstractAccessorStrategy + * + * @param The $item + * @param The $field + * @return bool + */ + public function exists(&$item, $field) + { + return (isset($item->$field) + || isset($this->mappedParameters[$field]) + || isset($this->handlerParameters[$field]) + ); + } + +} diff --git a/library/Icinga/Backend/Query.php b/library/Icinga/Backend/Query.php new file mode 100755 index 000000000..016aa00ce --- /dev/null +++ b/library/Icinga/Backend/Query.php @@ -0,0 +1,66 @@ +backend = $backend; + if (empty($columns) || $columns === '*') { + $this->columns = $this->available_columns; + } else { + $this->columns = $columns; + } + $this->init(); + } + + public function applyFilters($filters = array()) + { + foreach ($filters as $key => $val) { + $this->where($key, $val); + } + return $this; + } + + abstract protected function init(); + + protected function finalize() {} + + /** + * Return a pagination adapter for the current query + * + * @return \Zend_Paginator + */ + public function paginate($limit = null, $page = null) + { + $this->finalize(); + $request = \Zend_Controller_Front::getInstance()->getRequest(); + if ($page === null) { + $page = $request->getParam('page', 0); + } + if ($limit === null) { + $limit = $request->getParam('limit', 20); + } + $paginator = new \Zend_Paginator( + new \Icinga\Web\Paginator\Adapter\QueryAdapter($this) + ); + $paginator->setItemCountPerPage($limit); + $paginator->setCurrentPageNumber($page); + return $paginator; + } +} + diff --git a/library/Icinga/Backend/Statusdat.php b/library/Icinga/Backend/Statusdat.php new file mode 100755 index 000000000..e0f16fea5 --- /dev/null +++ b/library/Icinga/Backend/Statusdat.php @@ -0,0 +1,58 @@ +reader = new StatusdatProtocol\Reader($this->config); + } + + public function getReader() + { + return $this->reader; + } + + public function listServices($filter = array(), $flags = array()) + { + $query = $this->select()->from("servicelist"); + return $query->fetchAll(); + } + + + public function fetchHost($host) + { + $objs = & $this->reader->getObjects(); + + if (!isset($objs["host"][$host])) + return null; + $result = array($objs["host"][$host]); + return new MonitoringObjectList( + $result, + new \Icinga\Backend\Statusdat\DataView\StatusdatHostView($this->reader) + ); + } + + public function fetchService($host, $service) + { + $idxName = $host . ";" . $service; + $objs = & $this->reader->getObjects(); + + if (!isset($objs["service"][$idxName])) + return null; + $result = array($objs["service"][$idxName]); + return new MonitoringObjectList( + $result, + new \Icinga\Backend\Statusdat\DataView\StatusdatServiceView($this->reader) + ); + + } + + +} diff --git a/library/Icinga/Backend/Statusdat/DataView/StatusdatHostView.php b/library/Icinga/Backend/Statusdat/DataView/StatusdatHostView.php new file mode 100644 index 000000000..aba27469b --- /dev/null +++ b/library/Icinga/Backend/Statusdat/DataView/StatusdatHostView.php @@ -0,0 +1,48 @@ + "getHost", + "downtimes_with_info" => "getDowntimes", + "comments_with_info" => "getComments" + ); + + protected $mappedParameters = array( + "host_address" => "host_name", + "host_name" => "host_name", + "host_state" => "status.current_state", + "host_output" => "status.plugin_output", + "host_perfdata" => "status.long_plugin_output", + "host_state" => "status.current_state", + "host_perfdata" => "status.long_plugin_output", + "host_last_state_change" => "status.last_state_change", + "host_output" => "status.plugin_output", + "host_check_command" => "check_command", + "host_last_check" => "status.last_check", + "host_next_check" => "status.next_check", + "host_check_latency" => "status.check_latency", + "host_check_execution_time" => "status.check_execution_time", + "active_checks_enabled" => "status.active_checks_enabled", + + "acknowledged" => "status.problem_has_been_acknowledged", + "host_acknowledged" => "status.problem_has_been_acknowledged", + // "state" => "current_state" + ); + + + public function getHost(&$item) { + if(!isset($this->state["host"][$item->host_name])) + return null; + if(!isset($this->state["host"][$item->host_name])) + return null; + return $this->state["host"][$item->host_name]; + } + + public function __construct(IReader $reader) { + $this->state = &$reader->getState(); + } +} diff --git a/library/Icinga/Backend/Statusdat/DataView/StatusdatServiceView.php b/library/Icinga/Backend/Statusdat/DataView/StatusdatServiceView.php new file mode 100755 index 000000000..28de846a9 --- /dev/null +++ b/library/Icinga/Backend/Statusdat/DataView/StatusdatServiceView.php @@ -0,0 +1,62 @@ + "getHost", + "downtimes_with_info" => "getDowntimes" + ); + + protected $mappedParameters = array( + "host_address" => "parenthost.address", + "host_name" => "host_name", + "active_checks_enabled" => "status.active_checks_enabled", + "passive_checks_enabled" => "status.passive_checks_enabled", + "service_state" => "status.current_state", + "service_perfdata" => "status.performance_data", + "service_last_state_change" => "status.last_state_change", + "service_output" => "status.plugin_output", + "service_long_output" => "status.long_plugin_output", + "service_check_command" => "check_command", + "service_last_check" => "status.last_check", + "service_next_check" => "status.next_check", + "service_check_latency" => "status.check_latency", + "service_check_execution_time" => "status.check_execution_time", + "service_acknowledged" => "status.problem_has_been_acknowledged", + "service_comments" => "comment" + + ); + + public function get(&$item, $field) + { + if(!isset($item->parenthost) && isset($this->state["host"])) + $item->parenthost = $this->state["host"]; + + return parent::get($item,$field); + } + public function exists(&$item, $field) + { + if(!isset($item->parenthost)) + $item->parenthost = $this->state["host"]; + + return parent::exists($item,$field); + } + + public function getHost(&$item) + { + if (!isset($this->state["host"][$item->host_name])) + return null; + if (!isset($this->state["host"][$item->host_name])) + return null; + return $this->state["host"][$item->host_name]; + } + + public function __construct(IReader $reader) + { + $this->state = & $reader->getState(); + } +} diff --git a/library/Icinga/Backend/Statusdat/GroupsummaryQuery.php b/library/Icinga/Backend/Statusdat/GroupsummaryQuery.php new file mode 100755 index 000000000..89765d343 --- /dev/null +++ b/library/Icinga/Backend/Statusdat/GroupsummaryQuery.php @@ -0,0 +1,139 @@ + 'SUM(CASE WHEN state = 0 THEN 1 ELSE 0 END)', + 'critical' => 'SUM(CASE WHEN state = 2 AND downtime = 0 AND ack = 0 THEN 1 ELSE 0 END)', + 'critical_dt' => 'SUM(CASE WHEN state = 2 AND downtime = 1 THEN 1 ELSE 0 END)', + 'critical_ack' => 'SUM(CASE WHEN state = 2 AND downtime = 0 AND ack = 1 THEN 1 ELSE 0 END)', + 'unknown' => 'SUM(CASE WHEN state = 3 AND downtime = 0 AND ack = 0 THEN 1 ELSE 0 END)', + 'unknown_dt' => 'SUM(CASE WHEN state = 3 AND downtime = 1 THEN 1 ELSE 0 END)', + 'unknown_ack' => 'SUM(CASE WHEN state = 3 AND downtime = 0 AND ack = 1 THEN 1 ELSE 0 END)', + 'warning' => 'SUM(CASE WHEN state = 1 AND downtime = 0 AND ack = 0 THEN 1 ELSE 0 END)', + 'warning_dt' => 'SUM(CASE WHEN state = 1 AND downtime = 1 THEN 1 ELSE 0 END)', + 'warning_ack' => 'SUM(CASE WHEN state = 1 AND downtime = 0 AND ack = 1 THEN 1 ELSE 0 END)', + ); + + protected $order_columns = array( + 'state' => array( + 'ASC' => array( + 'ok ASC', + 'warning_dt ASC', + 'warning_ack ASC', + 'warning ASC', + 'unknown_dt ASC', + 'unknown_ack ASC', + 'unknown ASC', + 'critical_dt ASC', + 'critical_ack ASC', + 'critical ASC', + ), + 'DESC' => array( + 'critical DESC', + 'critical_ack DESC', + 'critical_dt DESC', + 'unknown DESC', + 'unknown_ack DESC', + 'unknown_dt DESC', + 'warning DESC', + 'warning_ack DESC', + 'warning_dt DESC', + 'ok DESC', + ), + 'default' => 'DESC' + ) + ); + + private function getStateType(&$obj) + { + + if ($obj->status->current_state == 0) + return "ok"; + $typeBase = ""; + if ($obj->status->current_state == 1) { + $typeBase = 'warning'; + } else if ($obj->status->current_state == 2) { + $typeBase = 'critical'; + } else if ($obj->status->current_state == 3) { + $typeBase = 'unknown'; + } + if ($obj->status->problem_has_been_acknowledged) { + return $typeBase . "_ack"; + + } else if (isset($obj->status->downtime)) { + return $typeBase . "_dt"; + } + return $typeBase; + } + + public function groupByProblemType(&$indices) + { + + + $typename = $this->groupType."_name"; + $result = array(); + foreach ($indices as $type=>$subIndices) { + + foreach ($subIndices as $objName) { + + $obj = &$this->reader->getObjectByName($type,$objName); + $statetype = $this->getStateType($obj); + foreach($obj->group as $group) { + if(!isset($result[$group])) { + $result[$group] = (object) array( + $typename => $group, + 'ok' => 0, + 'critical' => 0, + 'critical_dt' => 0, + 'critical_ack' => 0, + 'unknown' => 0, + 'unknown_dt' => 0, + 'unknown_ack' => 0, + 'warning' => 0, + 'warning_dt' => 0, + 'warning_ack' => 0 + ); + } + $result[$group]->$statetype++; + } + } + } + + return array_values($result); + } + + /** + * @var \Icinga\Protocol\Statusdat\Query + */ + + + public function init() { + $this->reader = $this->backend->getReader(); + $this->query = $this->reader->select()->from($this->base,array())->groupByFunction("groupByProblemType",$this)->where("COUNT{group} > 0"); + + } + + + public function where($column, $value = null) + { + if ($column === 'problems') { + if ($value === 'true') { + //$this->where("COUNT{downtime} == 0 AND status.problem_has_been_acknowledged == 0 AND status.current_state > 0"); + } + } elseif ($column === 'search') { + if ($value) { + $this->where($this->name_alias . ' LIKE ?', '%' . $value . '%'); + } + } else { + parent::where($column, $value); + } + return $this; + } +} + diff --git a/library/Icinga/Backend/Statusdat/HostgroupsummaryQuery.php b/library/Icinga/Backend/Statusdat/HostgroupsummaryQuery.php new file mode 100755 index 000000000..14f160eca --- /dev/null +++ b/library/Icinga/Backend/Statusdat/HostgroupsummaryQuery.php @@ -0,0 +1,10 @@ +reader = $this->backend->getReader(); + $this->query = $this->reader->select()->from("hosts",array()); + } + + + +} diff --git a/library/Icinga/Backend/Statusdat/Query.php b/library/Icinga/Backend/Statusdat/Query.php new file mode 100644 index 000000000..32bda66d7 --- /dev/null +++ b/library/Icinga/Backend/Statusdat/Query.php @@ -0,0 +1,214 @@ + "status.current_state", + \Icinga\Backend\Criteria\Order::STATE_CHANGE => "status.last_state_change", + \Icinga\Backend\Criteria\Order::HOST_STATE => "status.current_state", + \Icinga\Backend\Criteria\Order::HOST_NAME => "host_name", + \Icinga\Backend\Criteria\Order::SERVICE_NAME => "service_description" + ); + + /** + * Calls the apply%Filtername%Filter() method for the given filter, or simply calls + * where(), if the method is not available. + * + * @see \Icinga\Backend\Query For the parent definition + * + * @param array $filters An array of "filtername"=>"value" definitions + * + * @return Query Returns the query object to allow fluent calls + */ + public function applyFilters(array $filters = array()) + { + foreach ($filters as $filter => $value) { + $filter[0] = strtoupper($filter[0]); + $filterMethod = "apply" . $filter . "Filter"; + if (method_exists($this, $filterMethod)) + $this->$filterMethod($filter, $value); + else + $this->where($filter, $value); + } + return $this; + } + + /** + * Applies a filter to only show open problems, or non problems, depending whether value is true or false + * + * @param $type ignored + * @param $value Whether problems should be shown (1) or non problems (0) + */ + public function applyProblemsFilter($type, $value) + { + if ($value) { // Status.dat only contains active downtimes + $value = array(1, 0); + $this->where("(status.current_state >= ? and COUNT{status.downtime} = ? )", $value); + } else { + $value = array(0, 1); + $this->where("(status.current_state < 1 or COUNT{status.downtime} > ? )", $value); + } + } + + /** + * Generic object search by host name, service description and plugin output + * + * @param $type ignored + * @param $value The string to search for + */ + public function applySearchFilter($type, $value) + { + $text = "%$value%"; + $val = array($text, $text, $text); + + $this->query->where("(host_name LIKE ? OR service_description LIKE ? OR status.plugin_output LIKE ?)", $val); + + } + + /** + * Applies a hostgroup filter on this object + * + * @param $type ignored + * @param $value The hostgroup to filter for + */ + public function applyHostgroupsFilter($type, $value) + { + $filter = array($value); + $this->query->where("host.group IN ?", $filter); + } + + /** + * Applies a servicegroup filter on this object + * + * @param $type ignored + * @param $value The servicegroup to filter for + */ + public function applyServicegroupsFilter($type, $value) + { + $filter = array($value); + $this->query->where("group IN ?", $filter); + } + + /** + * Filters by handled problems or unhandled + * + * @todo: Add downtime + * @param $type + * @param $value Whether to search for unhandled (0) or handled (1) + */ + public function applyHandledFilter($type, $value) + { + $val = array($value, $value); + $this->query->where("(status.problem_has_been_acknowledged = ? )", $val); + } + + public function applyHostnameFilter($type, $value) + { + if (!is_array($value)) + $value = array($value); + $this->query->where("host_name LIKE ?", $value); + } + + public function applyStateFilter($type, $value) + { + $this->query->where("status.current_state = $value"); + } + + public function applyHoststateFilter($type, $value) + { + $this->query->where("host.status.current_state = $value"); + } + + public function applyServiceDescriptionFilter($type, $value) + { + if (!is_array($value)) + $value = array($value); + $this->query->where("service_description LIKE ?", $value); + } + + /** + * Limits this query and offsets it + * @param null|integer $count The maximum element count to display + * @param null|integer $offset The offset to start counting + * @return Query This object, for fluent interface + */ + public function limit($count = null, $offset = null) + { + $this->query->limit($count, $offset); + return $this; + } + + /** + * Orders the resultset + * + * @param string $column Either a string in the 'FIELD ASC/DESC format or only the field + * @param null $dir 'asc' or 'desc' + * @return Query Returns this query,for fluent interface + */ + public function order($column = '', $dir = null) + { + + if ($column) + $this->query->order($this->orderColumns[$column], strtolower($dir)); + return $this; + } + + /** + * Applies a filter on this query by calling the statusdat where() function + * + * @param $column The (statusdat!) column to filter in "field operator ?" format. (@example status.current_state > ?) + * @param mixed $value The value to filter for + * @return Query Returns this query,for fluent interface + */ + public function where($column, $value = null) + { + if (!is_array($value)) + $value = array($value); + $this->query->where($column, $value); + return $this; + } + + public function fetchAll() + { + $view = $this->view; + if (!$this->cursor) + $this->cursor = new MList($this->query->getResult(), new $view($this->reader)); + return $this->cursor; + } + + public function fetchRow() + { + return next($this->fetchAll()); + } + + public function fetchPairs() + { + + } + + public function fetchOne() + { + return next($this->fetchAll()); + } + + public function count() + { + return count($this->query->getResult()); + } + +} \ No newline at end of file diff --git a/library/Icinga/Backend/Statusdat/ServicegroupsummaryQuery.php b/library/Icinga/Backend/Statusdat/ServicegroupsummaryQuery.php new file mode 100644 index 000000000..f59ed8454 --- /dev/null +++ b/library/Icinga/Backend/Statusdat/ServicegroupsummaryQuery.php @@ -0,0 +1,10 @@ +reader = $this->backend->getReader(); + $this->query = $this->reader->select()->from("services",array()); + } + + + +} diff --git a/tests/php/library/Icinga/Backend/Statusdat/.ServicegroupsummaryQueryTest.php.swp b/tests/php/library/Icinga/Backend/Statusdat/.ServicegroupsummaryQueryTest.php.swp new file mode 100644 index 0000000000000000000000000000000000000000..2d72d78c720bca0226c583cabc35a91091e1c9a3 GIT binary patch literal 20480 zcmeI44{V%e9mgMJqD%%lh8Q-?yIbR~we9t;B`%beNm=cJlj4Smsb1c@d)r=jy}Q2e zd+oZ0KM5+te{~pzh<~;y{s}CGC^04wi9;O_goq}JAPEU-Ffxs95fjkQ^ZvPB-#*t{ zyS7vFyxC`W_rA~j{P{kAf6wzvGaVn=wcB`4d#B)fs}Prc>;CI*z4RF|a)A(IrBPGf zZgfpLZKGo)#~Crl#w@!%Uv%4xmOE)qIqf;C=H;7Zgo)w2o5*ML#bGnmHfd!NuI0E+ zqC8Sg6!IC{w5Jlgyr+q)%(SYTLF>bf%IW^6r+{X5+&3*VhElU$p{S0j+>mKr5gX&^7(!^7ml4T z#3$iuIJr)U!*B?4FaXy=2V4Rh;Lqm?@i;sRN8vEs1~yQBxu7Pc^27bea%Zp$ruGmP)annU} z%!(P?dkpWV8Ec&v)_>6L_}&&NFL1n+8MU%*vtin{ITfGxPV@X|WDc6uIgyWIWxJFq zSYzoC(@AG6tC+^$qga|OSh-;<=Ox-9WI)vw%T{dLD!OS0=McX*9qJs!WQdA$N`;Uq z)hUR46muq$F(JQ2ubAhO;-yhXANfWsP&A#hoUENMyZKVldnbI5R8)rd;*u&Z*|5xE zy7e-y(4tw$3`MUnB41`-g3eZ>tJS!y&I`o~u0r{2dcrJtsn@GLMaeS?mAodKX;@&H zZ$+WxZB-FET8(6@ky`#D)bDi-i{O=1RbjT}R_vltv?h%YT4v6&cbBsJ;x)~2TF7#i z?fe8?#u%y;v$6pi!-_#)3Mw*J=X8DH+jM3E6uG<<83`&6TfO|!0)wtr^;5m zDPPRtkL5HscUJ>@FU!Vi?3-|x3p zigG0JMif6aRZL-^1(OQ`%_gUciO%fivu43B9T`{UsT#;juTJU0Kz@340+pnM)k_^H zY|dV-)r|ShL@LsK78=SBEvaD#_6OK-O+d>2@*xx6p;blhbk4ieHGlG) zyVR&gYtDx-ioB19jwqZ&r`agFg}CBM=`kQHMY6c+ZO7(a>;WF8*)h@1F9~?hMdBdk#8>Vh8%Xsif_wxMNE#c{GRbr zV_VC;s`{H#p-I!#aEnLAuduwm+d}@Yx^(T;*;I`hjG=f-tG&+ujoM4iHIl1kUe?X< z)#!WC-KuIy7PT=P_Px_Q%Lo&Xex5?#Thvj;Dvg{XS`PX93>;-N9y1#sWyq|r#F)9L zdRvuVx3Wi2iy1BJpJIgl?aYmq3)EYVlL0p$9D@4iBkZfR$Lcg6uT#uFZd{c%kKLMq7Bk eJ@)|o6#W^r>w)iblsFyN1O9;Ctm8mf9sdCYfM$OH literal 0 HcmV?d00001 diff --git a/tests/php/library/Icinga/Backend/Statusdat/ServicegroupsummaryQueryTest.php b/tests/php/library/Icinga/Backend/Statusdat/ServicegroupsummaryQueryTest.php index d80b611f9..0d329daa1 100644 --- a/tests/php/library/Icinga/Backend/Statusdat/ServicegroupsummaryQueryTest.php +++ b/tests/php/library/Icinga/Backend/Statusdat/ServicegroupsummaryQueryTest.php @@ -2,14 +2,14 @@ namespace Tests\Icinga\Backend\Statusdat; use Tests\Icinga\Protocol\Statusdat\ReaderMock as ReaderMock; - +require_once("Zend/Config.php"); require_once("./library/Icinga/Protocol/Statusdat/ReaderMock.php"); -require_once("../library/Icinga/Backend/Query.php"); -require_once("../library/Icinga/Backend/Criteria/Order.php"); -require_once("../library/Icinga/Backend/AbstractBackend.php"); -require_once("../library/Icinga/Backend/Statusdat/Query.php"); -require_once("../library/Icinga/Backend/Statusdat/GroupsummaryQuery.php"); -require_once("../library/Icinga/Backend/Statusdat/ServicegroupsummaryQuery.php"); +require_once("../../library/Icinga/Backend/Query.php"); +require_once("../../library/Icinga/Backend/Criteria/Order.php"); +require_once("../../library/Icinga/Backend/AbstractBackend.php"); +require_once("../../library/Icinga/Backend/Statusdat/Query.php"); +require_once("../../library/Icinga/Backend/Statusdat/GroupsummaryQuery.php"); +require_once("../../library/Icinga/Backend/Statusdat/ServicegroupsummaryQuery.php"); class BackendMock extends \Icinga\Backend\AbstractBackend{ public $reader;