Commit Graph

336 Commits

Author SHA1 Message Date
Alexander Klimov 9c5878cbbe ConfigurationError: extend IcingaException
refs #6931
2014-08-22 11:46:11 +02:00
Thomas Gelf a8d33d90e2 Monitoring\Object: fix a couple of cv-related issues
* Don't throw exceptions with no config
* Provide a secure default if not configured
* Improve code readability
2014-08-20 13:36:03 +02:00
Alexander Klimov bb65fb396a Merge branch 'bugfix/sensitive-custom-vars-6641'
fixes #6641
2014-08-20 12:29:45 +02:00
Alexander Klimov 071937910b Monitoring/Object: filter protected customvars
Move the responsibility from the viewscript to Monitoring/Object

refs #6641
2014-08-19 18:46:37 +02:00
Johannes Meyer 3573908071 Let downtime view look more list-like and fix downtime end calculation
refs #6637
2014-08-19 17:03:35 +02:00
Johannes Meyer 54461f9319 Treat hard states more severe than soft states
fixes #6571
2014-08-15 12:40:56 +02:00
Thomas Gelf 51484ebf88 monitoring/Perfdata: ignore invalid min/max
key=23;0;0;0;0 and key=23;;;; lead to division by zero exceptions
This should fix this by ignoring empty strings for min/max (formerly
it got "converted" to float(0)) and also ignores min == max.

fixes #6828
2014-07-31 16:52:34 +02:00
Johannes Meyer f1d7cd8b50 Remove forgotten coding standards annotation 2014-07-16 13:59:43 +02:00
Johannes Meyer 3105c2059e Remove license headers from all files
refs #6309
2014-07-15 13:43:52 +02:00
Johannes Meyer bacea36ad9 Improve piechart limitation and show non-piechart perfdata as well
The perfdata helper did an improper limitation as it might have skipped
valid values due to applying the limit before the filter. When not in compact
view the helper now also shows non-piechart values by using their raw
representation.

refs #6515
2014-07-14 13:48:30 +02:00
Johannes Meyer ec2d1daa6b Perfdata plugin should also have a knowledge about labels
Prior to this change the PerfdataSet only knew the labels of a performance
data value which prevented the Perfdata object from being used
individually.

refs #6515
2014-07-11 16:31:00 +02:00
Johannes Meyer 0d92efc1b0 Consider is_active column when fetching host and service statistics
fixes #6157
2014-07-09 11:49:22 +02:00
Johannes Meyer 7eb0f3c472 Remove @codingStandardsIgnoreStart/-Stop annotations
refs #6091
2014-06-30 13:59:58 +02:00
Thomas Gelf ff9c29472e monitoring/status: re-introduce comments, problems
This re-introduces expensive columns been disabled time ago and adds
even more to it. We are now showing last comment, last ack comment and
service problem count on hosts in list views.

It still costs performance, but seems that we can stand it. I'd like
to add more like this to the host view.
2014-06-25 21:42:24 +02:00
Thomas Gelf d634889acb DataView: ignore case on sort dir
fixes #6573
2014-06-25 21:34:05 +02:00
Thomas Gelf 11ce302be0 Ido\StatusQuery: fine-tune query filters
This is still experimental. We normalize a lot of columns, this allows
us to sort in a convenient way while having nice "showable" columns.
When used as filters (same goes for ordering) however, functions and
operations on table columns often hinder the db from using indexes.

The new filter implementation allows us to override query creating per
single column, that's what this first sample is trying to show. We still
need to fix alias handling, so unfortunately I have to deal with "real
columns" in the case construct.

Performance gain in large environments is impressive, more to come.
2014-06-25 21:12:44 +02:00
Thomas Gelf 32572ae653 Monitoring\Object\Service: don't load host comment
I'd like to reintroduce those columns, showing last object comment
and so one. Those joins are costly, we can fetch host comments way
easier directly from host object once we are here. But I guess we
don't even need it.
2014-06-25 20:21:19 +02:00
Matthias Jentsch 85aed364b7 Fix typing error in 'threshold' 2014-06-25 15:02:04 +02:00
Matthias Jentsch 35a5431512 Revert "Refractor InlinePie and Perfdata helper"
This reverts commit f003c38abd.
2014-06-25 14:29:17 +02:00
Matthias Jentsch f003c38abd Refractor InlinePie and Perfdata helper
Refractor InlinePie methods for better usability, fix several coding guideline
issues and fix some typos
2014-06-25 12:41:17 +02:00
Thomas Gelf b7fc0b67a8 Web/controllers: use own Request/Response objects
* introduces Icinga\Web\Response
* uses ModuleActionController where necessary
* no module translationDomain voodoo in base ActionController
2014-06-22 13:49:21 +02:00
Thomas Gelf 57ad88c38c monitoring/process: was broken, fix it
Stumbled across two issues here:

* It's currently not possible to fetch all (*) columns from a DataView
* Backends are not able to tell their names

Worked around the first issue by naming all columns and implemented a
quick & dirty solution for the second one.
2014-06-21 04:25:02 +02:00
Thomas Gelf 7b5d7bdbcf monitoring/statehistorysummary: filter fixes
Slightly adjusted filter string to fit new filters, fixed an issue
with 'object_type' column in virtual eventhistory table.
2014-06-21 03:18:00 +02:00
Thomas Gelf b3cdeee35d monitoring/timeline: should benefit from new filter
Different changes have been applied:

* Allow integer unix timestamps as parameters for timestamp columns
* Remove alias-rewriting from Url class
* Remove all traces of raw_timestamp
* Use new filters
2014-06-21 03:09:40 +02:00
Thomas Gelf e2f7a1054e CSV/JSON export: work with new query interfaces
NB: I do not like the fact that we have to do as follows:

  DataView->getQuery()->fetchWhatever();

Guess this is worth a few more proxy functions.
2014-06-21 00:09:11 +02:00
Thomas Gelf a904ff51aa monitoring/eventhistory: improve query performance
This takes care of timestamp columns, modifies queries in a way not
depending on db functions, filters are passed through to subqueries
for better performance.
2014-06-20 19:14:34 +02:00
Thomas Gelf ccb01aa152 Monitoring\Controller: add $url to all views
There are too many view scripts fiddling with namespaces. There is
still the url helper, not sure why it's not going to be used. I may
roll this back one far day...
2014-06-20 12:26:00 +02:00
Thomas Gelf ecf84077e5 Ido\CommentQuery: add host/service shortcut column 2014-06-20 12:23:23 +02:00
Thomas Gelf 8185f8b8a9 Ido\EventHistoryQuery: fix it to fit new filters
Works for single objects, still some work required for "generic"
history.
2014-06-17 14:02:54 +00:00
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