Commit Graph

307 Commits

Author SHA1 Message Date
Thomas Gelf e3e6826d9d Icinga\Filter: remove 2014-06-17 13:26:57 +00:00
Thomas Gelf 75a9640563 Monitoring\Object\Service: add check performance
Service object was missing latency and check properties
2014-06-17 13:14:00 +00:00
Thomas Gelf 0e09a1c7ba Monitoring\Object\Host: explicit WHERE
Related to the former commit, no more auto-voodoo
2014-06-17 13:12:36 +00:00
Thomas Gelf 3ccfe347f3 Monitoring\Object: replace fromRequest with params
This is only a temporary solution, the Monitoring\Object should be
fetched from the backend created in our front controller.
2014-06-17 13:10:54 +00:00
Thomas Gelf 468b290277 Monitoring\Controller: provide $this->backend
Every monitoring controller needs $backend, so why declaring it over
and over again. Created "moduleInit" dummy function in our base action
controller to allow such implementations without polluting init().
2014-06-17 12:55:43 +00:00
Thomas Gelf 660f84b22f DataView\EventHistory: default sort by timestamp
It doesn't make much sense to sort history by "hostname" hardcoded to
service-only host columns. Default is now timestamp DESC, internally
this is mapped to raw_timestamp.
2014-06-17 12:51:13 +00:00
Thomas Gelf dd595a2ad3 Ido/EventHistoryQuery: obsolete raw_timestamp
This was never thought to be used in frontends. Frontend code ALWAYS
needs to work with unix timestamps, raw timestamps are used internally
(e.g. between View and Query) to achieve better search and sort
performance.
2014-06-17 12:47:02 +00:00
Thomas Gelf 93e2f36fc8 DataView: remove duplicate case handling 2014-06-17 12:46:41 +00:00
Thomas Gelf dab90d6c4a GroupsummaryQuery: distinct columns/desiredColumns
I guess this needs some more investigation, desiredColumns are the
ones the user asked for ([alias => ]column), with column being once
again an alias in the "real" query. Alias resolution used to work
better long time ago, we should reflect on this.
2014-06-17 12:42:50 +00:00
Thomas Gelf 027ef6ede3 Ido\Query\*historyQuery: subqueries join objects
Each of our history subqueries should be able to join main object
tables on their own for performance reasons.
2014-06-17 12:36:32 +00:00
Thomas Gelf 7cd696b31b Data/queries: adjust to fit new filters
Slight changes to get our queries working with new filter implementation.
2014-06-17 12:34:02 +00:00
Thomas Gelf 4c76f5ab02 Ido/Query: small fixes
Replaced baseQuery in ContactGroupQuery, added short host/service
columns to CustomvarQuery.
2014-06-13 10:44:03 +00:00
Thomas Gelf e1421c0d7e Ido\StatusQuery: make sure performance killers...
...can no longer be reached. Column-ignorant uses still stumbled over
this. Left the code there as we should take a decision on how to approach
this.
2014-06-06 07:10:52 +00:00
Thomas Gelf 4f3596fcaf Monitoring\Object: fit new Query classes
refs #6418
2014-06-06 07:09:15 +00:00
Thomas Gelf c77e178bc7 Monitoring\DataView: small changes
Nothing interesting here
2014-06-06 07:07:07 +00:00
Thomas Gelf 1677193571 Monitoring: adjust Backend and DataView
Made them use the new filters and interfaces.

refs #6418
2014-06-06 07:05:21 +00:00
Thomas Gelf 1c3ab74e80 IdoQuery: fit new DbQuery implementation
Just a bunch of small changes, more to come. Fixes customvar handling
and is now able to handle the new Filter implementation.

refs #6418
2014-06-06 06:57:28 +00:00
Thomas Gelf f1e73c5fc5 Data\Db\DbQuery: forgot to rename once
refs #6418
2014-06-06 06:52:48 +00:00
Thomas Gelf 3adf7752c4 Data\Db\DbQuery: rename also in monitoring module
refs #6418
2014-06-06 06:51:11 +00:00
Thomas Gelf bfe6a1593a Merge remote-tracking branch 'origin/master' into feature/query-interfaces-6018 2014-06-06 05:32:54 +00:00
Thomas Gelf 7a0173e2fb monitoring/IdoQuery:
IDO version is cached in a session namespace. This fails where you
are using multiple IDO backends with different versions. We still have
no backend-specific base class where we could handle this, so for now
I continue to do so in the IdoQuery.

This patch creates one namespace per Host/dbname combination.
2014-05-28 09:39:38 +00:00
Thomas Gelf 12b57c6d95 Merge remote-tracking branch 'origin/master' into feature/query-interfaces-6018
Conflicts:
	modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php
	modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php
	modules/monitoring/library/Monitoring/Backend/Ido/Query/StatusQuery.php
	modules/monitoring/library/Monitoring/Controller.php
2014-05-20 23:15:11 +00:00
Thomas Gelf 8b28bdc82a Monitoring\Object: small fix for strange private's 2014-05-20 22:22:48 +00:00
Thomas Gelf a7b8e0023d Monitoring\Object: explictely define columns
Define the colums we use instead of fetching "everything" status view
provides. Without this performance degrades with every new feature.
2014-05-20 22:19:26 +00:00
Thomas Gelf 76c1aa73c8 Monitoring\Controller: remove obsolete namespaces 2014-05-20 22:13:39 +00:00
Thomas Gelf 31fa794440 monitoring/ido: implement IDO version support
We want to make use of new IDO features without breaking compatibility.
This is a quickfix as otherwise we would currently break everything
below 1.10. Code contains a few TODOs as this needs improvement.
2014-05-20 20:36:39 +00:00
Michael Friedrich 9fbdb65a4b Add check source to host/service details
refs #5814
2014-05-20 20:07:09 +02:00
Thomas Gelf e6d80ae1f6 IDO Queries: performance quickfixes
Will be obsoleted by the new filter implementation, but for now it
helps a little bit
2014-05-20 13:27:58 +00:00
Thomas Gelf 820b6b7a8d Data\BaseQuery: rename to Data\SimpleQuery
BaseQuery should no longer be abstract but be usable as is as soon as
we stripped ResultSet-specific tasks. As "Base" suggests something that
must be extended, the name no longer fits. So this is SimpleQuery right
now.
2014-05-07 11:55:35 +00:00
Eric Lippmann 5b895ab038 Data views: Implement `Sortable' interface
Because the `ListController' should only operate on data views,
data views should be a proxy to their underlying queries.

The methods `DataView::fromRequest()' and `DataView::sort()' are from now on deprecated
because they are relaced by `$backend->select()->from($viewName)' and `DataView::order()' respectively.
2014-05-07 10:19:00 +02:00
Eric Lippmann d87788b9c1 Merge branch 'master' into feature/query-interfaces-6018
Conflicts:
	modules/monitoring/library/Monitoring/Backend/Ido/Query/ContactgroupQuery.php
2014-05-06 18:45:12 +02:00
Eric Lippmann 97d6feccb8 Data views: Expect a query instance instead of a backend 2014-05-06 18:34:01 +02:00
Eric Lippmann c23e0c3782 Remove createBackend() method from the base controller
Refering to d389d8e we'll use Backend::createBackend() for accessing monitoring backends.
2014-05-06 18:24:42 +02:00
Thomas Gelf d389d8e0f0 Re-establish Backend::createBackend
This partially reverts fcf7f7d6. The original intention was to have
no library code reading config. Moving code snippets to another lib
doesn't solve this. We need quick & easy access to a monitoring
backend, on CLI, in other modules and so forth. Duplicating so much
code again and again is not an option.

I prefer the former way of doing things unless we find a better
solution.
2014-05-06 18:23:22 +02:00
Johannes Meyer 3d88e720c4 Rewrite perfdata plugin classes
refs #5973
2014-05-05 16:15:49 +02:00
Johannes Meyer 290fe9eeb5 Rewrite test for Icinga\Web\Hook
refs #6011
2014-04-28 14:06:40 +02:00
Johannes Meyer 1db9b1ede4 Move non-factory functions from DateTimeFactory to Icinga\Util\Format 2014-04-28 14:06:39 +02:00
Thomas Gelf f741bc01f3 We need stricter control over Monitoring Object queries
* fromRequest-generated ones are sometimes buggy and sometimes slow
* this is just a temporary quickfix for the worst problems
2014-04-17 16:41:10 +00:00
Thomas Gelf cf7aaaed8e Better sort default for service status 2014-04-17 16:25:32 +00:00
Thomas Gelf 54175f98bf Fix wrong contactgroup service column and make better use of MySQL indexes 2014-04-17 16:14:57 +00:00
Eric Lippmann fcf7f7d6dc Replace Backend::createBackend() with Monitoring/Controller::createBackend()
Library code should not read configuration files. The new createBackend() method
from Monitoring/Controller takes care of reading backend configuration and error
handling. The Backend constructor now requires a resource instance.
2014-04-17 15:53:23 +02:00
Eric Lippmann e804f56d5f Data views: Rename getTableName() to getQueryName()
getQueryName is more obvious because the function returns
the name of the query the view should use for querying.
2014-04-17 13:59:11 +02:00
Eric Lippmann 62e044d888 IdoQuery: Move resolveColumns() to the columns() function
Since the BaseQuery no longer allows passing the columns to select via
its the constructor, the columns are resolved when set by the
columns() function.
2014-04-16 10:06:44 +02:00
Eric Lippmann eeadc17a6e StatusQuery: Rename baseQuery to select 2014-04-15 18:12:56 +02:00
Eric Lippmann 734c329caa StatusSummaryQuery: Rename baseQuery to select 2014-04-15 18:12:00 +02:00
Eric Lippmann 2ba1ef4793 StateHistorySummaryQuery: Rename baseQuery to select 2014-04-15 18:11:09 +02:00
Eric Lippmann a30d1cdb2f ServicegroupQuery: Rename baseQuery to select 2014-04-15 18:10:30 +02:00
Eric Lippmann ac5edc153a RuntimesummaryQuery: Rename baseQuery to select 2014-04-15 18:09:54 +02:00
Eric Lippmann 0adbb6a44e NotificationQuery: Rename baseQuery to select 2014-04-15 18:09:08 +02:00
Eric Lippmann 687fa09f7c NotificationhistoryQuery: Rename baseQuery to select 2014-04-15 18:07:34 +02:00