Commit Graph

355 Commits

Author SHA1 Message Date
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
Eric Lippmann cb812b59a8 HoststatusQuery: Rename baseQuery to select 2014-04-15 18:06:37 +02:00
Eric Lippmann 8b471e29e5 HostgroupQuery: Rename baseQuery to select 2014-04-15 18:02:03 +02:00
Eric Lippmann 32fa7b314c GroupsummaryQuery: Rename baseQuery to select 2014-04-15 18:01:10 +02:00
Eric Lippmann 30e649eeb4 EventHistoryQuery: Rename baseQuery to select 2014-04-15 17:59:55 +02:00
Eric Lippmann 67ce376ef0 DowntimeQuery: Rename baseQuery to select 2014-04-15 17:58:06 +02:00
Eric Lippmann 64bee6a414 CustomvarQuery: Rename baseQuery to select 2014-04-15 17:57:12 +02:00
Eric Lippmann 22fa833836 ContactQuery: Rename baseQuery to select 2014-04-15 17:56:31 +02:00
Eric Lippmann c2d633ac49 ContactgroupQuery: Rename baseQuery to select 2014-04-15 17:55:13 +02:00
Eric Lippmann 5caffa78e2 CommentQuery: Rename baseQuery to select 2014-04-15 17:53:07 +02:00
Michael Friedrich e6bb32be64 Fix division by zero in Perfdata.php
Fixes #5708

Signed-off-by: Michael Friedrich <Michael.Friedrich@netways.de>
2014-04-06 19:35:08 +02:00
Johannes Meyer 8be3ccc527 Make it possible to save the session by its associated session namespaces 2014-04-04 11:13:07 +02:00
Johannes Meyer ae2d61682f Fix how the timeline processes dates
refs #4190
2014-04-02 10:53:39 +02:00
Johannes Meyer 21b9c1f4af Fix that filters are not preserved on timeline element urls
refs #4190
2014-04-01 14:26:10 +02:00
Johannes Meyer 19b2a94777 Fix that the timeline does not regenerate the logarithmical base
refs #4190
2014-04-01 11:46:45 +02:00
Johannes Meyer 3d658a664c Do not use logarithm base from session if the timeline is not being extended
refs #4190
2014-04-01 11:46:43 +02:00
Johannes Meyer f7c6cd3c2a Make it possible to set a minimum circle width
refs #4190
2014-04-01 11:46:43 +02:00
Johannes Meyer f5e4331d71 Add timeline view script and styles
refs #4190
2014-04-01 11:46:43 +02:00
Johannes Meyer 66c3dd26e5 Be window aware when calculating circle widths
refs #4190
2014-04-01 11:44:25 +02:00
Johannes Meyer 2e19baf503 Make GET param of interval selection widget more generic 2014-04-01 11:44:25 +02:00
Johannes Meyer 18b5f715c5 Refactor timeline components
refs #4190
2014-04-01 11:44:25 +02:00
Johannes Meyer e21d288f5b Fix that the TimeRange cannot handle events occured at full hours
refs #4190
2014-04-01 11:44:25 +02:00
Johannes Meyer b22f3f6b47 The timeline object is NOT a form
refs #4190
2014-04-01 11:44:24 +02:00
Johannes Meyer 5e945e3194 Make interval selection being a widget
refs #4190
2014-04-01 11:44:24 +02:00
Johannes Meyer aade2ab7f6 Move timeline classes into the monitoring module
refs #4190
2014-04-01 11:44:24 +02:00
Johannes Meyer b168cf878d Fix type specification in DowntimestarthistoryQuery
refs #4190
2014-04-01 11:44:23 +02:00
Thomas Gelf b37c902e2d Prepare AbstractObject for farther performance tuning 2014-03-21 10:34:42 +00:00
Thomas Gelf 3b2272f825 Customvars are in customvariablestatus, "bugfix" in 1.10 has been reverted 2014-03-21 10:32:27 +00:00
Thomas Gelf 99041d0f15 Prepare support for custom additional columns 2014-03-21 10:24:17 +00:00
Johannes Meyer 71f4b6960b Add servicematrix view
refs #4180
2014-03-19 09:11:24 +01:00
Thomas Gelf 6466c768be Just whitespace 2014-03-09 22:48:38 +01:00
Thomas Gelf ad432217b2 Fix downtime scheduled start/end sort error 2014-03-09 22:35:33 +01:00
Thomas Gelf bf66271e49 Still downtimes 2014-03-09 22:32:40 +01:00
Thomas Gelf 88859cb838 The next fat package: downtimes, everywhere 2014-03-09 21:58:01 +01:00
Thomas Gelf 2f61075260 More comment query cleanup and fix a typo 2014-03-09 20:05:59 +01:00
Thomas Gelf 1659df216d Just a new TODO note 2014-03-09 19:43:04 +01:00
Thomas Gelf 2c3da5969a Great, sortControl is not alias-aware. Fix comment sort options 2014-03-09 19:39:32 +01:00
Thomas Gelf 63fd074a4f Comments are still messy, clean up and fix adding / removing them 2014-03-09 19:29:23 +01:00
Thomas Gelf a87925bbf6 Refactored notifications for object detail view 2014-03-08 21:02:22 +01:00
Thomas Gelf 740df4ccac Cleaning up object downtimes. What a mess... :( 2014-03-08 18:28:19 +01:00
Johannes Meyer e8a626e896 Change the way how boxed status information is presented to the user 2014-03-07 16:43:41 +01:00
Alexander Klimov 45520fe2d6 Remove hardcoded filter in state history summary query 2014-03-07 15:04:43 +01:00
Johannes Meyer 067fa02263 Split and merge status summary in tactical overview 2014-03-07 08:59:20 +01:00
Michael Friedrich 5853614d55 Fix CSV Export in monitoring module.
Fixes #5722
2014-03-06 23:54:03 +01:00
Michael Friedrich 91c15747cf Notification History: Fix contactnotificationmethods left join. 2014-03-06 22:18:32 +01:00
Thomas Gelf 84a62b7bbf Raw timestamp is for sort only 2014-03-06 18:42:26 +00:00
Johannes Meyer 1b503fd187 Clean up StatusSummary query 2014-03-06 14:29:50 +01:00
Alexander Klimov b410ebeed6 Remove unnecessary spaces at end of line 2014-03-06 13:08:11 +01:00
Thomas Gelf 864dc15514 Icinga Core 2 doesn't fill notification commands 2014-03-06 11:05:53 +00:00
Thomas Gelf 5dbf1e48a7 Allow format=sql to everybody right now
* we have no "devel" environment any more
* we might allow this based on permissions
2014-03-06 09:17:55 +00:00
Thomas Gelf 7d22994d80 Dudes need better error messages 2014-03-04 14:08:44 +00:00
Thomas Gelf 23daa39205 Ugly temporary fix for Monitoring\Object problems 2014-03-04 12:59:26 +00:00
Thomas Gelf 8ccd748310 Allow "better" join for comments 2014-03-04 12:57:40 +00:00