819 Commits

Author SHA1 Message Date
Sukhwinder Dhillon
63556849c9 HostnotificationQuery: Fix Variable '$$concattedContacts' is probably undefined 2023-08-23 10:53:14 +02:00
Sukhwinder Dhillon
c1bdec65f4 ServicenotificationQuery: Fix Variable '$$concattedContacts' is probably undefined 2023-08-23 10:53:14 +02:00
Sukhwinder Dhillon
9f3a9a006e IdoQuery: Fix method name case and var name type 2023-08-23 10:53:14 +02:00
Sukhwinder Dhillon
edb9500805 EventgridQuery: Remove duplicate array entry 2023-08-23 10:53:14 +02:00
Sukhwinder Dhillon
be060edd9f AllcontactsQuery: Add $baseQuery explicitly as non-dynamic property 2023-08-23 10:53:14 +02:00
raviks789
d22d2fb1e0 HoststatussummaryQuery: Fix name case for HoststatusQuery 2023-08-23 10:53:13 +02:00
raviks789
b481a771d0 ServicestatussummaryQuery: Fix name case for ServicestatusQuery 2023-08-23 10:53:13 +02:00
raviks789
caede2aaa9 MonitoringBackend: Import interface QueryInterface
The return type of `modules/monitoring/library/Monitoring/Backend/MonitoringBackend::query()` is `Icinga\Data\QueryInterface`.
Hence this interface is imported in `MonitoringBackend::class`.
2023-08-23 10:53:13 +02:00
Gianluca Piccolo
db9888b1f1 Fixes #5020 2023-06-22 15:11:39 +02:00
Johannes Meyer
4b60f87021 IdoQuery: Correct doc of method requireColumn() 2022-07-05 09:55:32 +02:00
Johannes Meyer
e5ec9a36f7 monitoring: Fix conversion rules for timestamps in various queries 2022-07-05 09:55:32 +02:00
Johannes Meyer
46a21d9709 Drop method DbQuery::whereToSql()
It's been used by `DbQuery::renderFilter()` rather
exclusively. So if removing one, both need to go.
2022-06-14 14:24:30 +02:00
Sukhwinder Dhillon
49bea36345 MonitoringBackend: Remove deprecated method createBackedn() 2022-06-14 14:24:30 +02:00
Johannes Meyer
3edb5c3c94 IdoQuery: Introduce method whereEx() 2022-05-12 16:28:35 +02:00
Johannes Meyer
c5cf7abf0d IdoQuery: Avoid passing null to preg_replace()
refs #4640
2022-04-19 15:01:52 +02:00
Johannes Meyer
0d032989e6 Fix style issues in recent security fixes 2022-03-08 15:20:16 +01:00
Johannes Meyer
8779f9f175 IdoQuery: Join customvars with only live references 2022-02-28 13:08:05 +01:00
Johannes Meyer
1092421782 Ido\Query\: Add objecttype_id checks where missing 2022-02-28 13:07:17 +01:00
Johannes Meyer
796742f03d monitoring/list/hosts: Don't show unhandled service counts
It has too much problems. It wasn't even visible since the
initial release, at least not if there were many results.
It being visible was more a case of chance than guarantee.
We now also identified a major issue with restrictions and
the way we can assemble queries here. In short, there are
too much technical difficulties that we deemed it not
worthwhile to keep.
2022-02-25 17:09:13 +01:00
Johannes Meyer
2e9a94144f HostserviceproblemsummaryQuery: Don't clear order of the host status query 2022-02-25 17:08:39 +01:00
Johannes Meyer
a4d34e265f IdoQuery: Don't try to add a HAVING without group by rules 2022-02-11 12:11:40 +01:00
Johannes Meyer
83557afd35 IdoQuery: Qualify and resolve subquery filters ASAP
fixes #4508
2021-08-24 09:32:36 +02:00
Johannes Meyer
b94617c575 ServicestatusQuery: Define correct grouping rules for contacts and -groups
fixes #4464
2021-07-21 17:41:55 +02:00
Johannes Meyer
963fdbd3e2 ServicegroupQuery: Join hostgroups with a LEFT JOIN
refs #4404
2021-07-05 14:59:24 +02:00
Johannes Meyer
13125e8059 HostgroupQuery: Join services and servicegroups with a LEFT JOIN
refs #4404
2021-07-05 14:58:49 +02:00
Alexander A. Klimov
6d5024c671 *downtimestarthistoryQuery#joinBaseTables(): don't call func_get_arg() with an invalid index
... as PHP 8 doesn't tolerate that.

refs #4287
2021-04-09 12:37:03 +02:00
Johannes Meyer
fe51f8c968 IdoQuery: Accept any character in custom var names
fixes #4342
2021-04-06 10:47:03 +02:00
Johannes Meyer
0fc06d7795 Transform * equal/unequal comparisons to NULL checks
This comes from https://github.com/Icinga/ipl-sql/pull/31
2021-03-12 09:50:59 +01:00
Johannes Meyer
b01bd74d5c ServicestatusQuery: Join contactgroups with the correct type id 2020-11-16 13:18:28 +01:00
Johannes Meyer
459e61ba55 ServicegroupQuery: Join contactgroups with the correct type id 2020-11-16 13:18:28 +01:00
Johannes Meyer
fbacd3db36 list/services: Avoid duplicates when filtering contact(group)s
fixes #4238
2020-11-16 13:17:32 +01:00
Johannes Meyer
0db4dc0311 IdoQuery: Force array cast when lowering subquery filter expressions
fixes #4196
2020-07-06 08:34:40 +02:00
Massimiliano Torromeo
9a29d8f3d4 Set default db charset for MySQL ido resources to latin1
latin1 seems to be the only supported charset for MySQL but the current upstream default charset is utf8mb4 and to be safe it should be set explicitly
2020-06-17 13:27:31 +02:00
Johannes Meyer
4505e29ce3 IdoQuery: Lowercase subquery ci filters on postgres
fixes #4178
2020-06-16 09:59:19 +02:00
Thomas Gelf
bdea1bfd47 Query\*notificationQuery: add missing host_alias
Fixes an Exception when searching for a specific alias (as offered in
the filter form)
2020-05-04 12:26:49 +02:00
Johannes Meyer
ded92c786a Add missing columns to empty group queries 2019-10-18 07:32:58 +02:00
Johannes Meyer
8e51518e96 ServicegroupQuery: Really join hosts if instructed to do so
fixes #3983
2019-10-17 16:14:28 +02:00
Johannes Meyer
908c408d3d ServicegroupsummaryQuery: Fetch empty groups with a union query
refs #3928
2019-10-11 10:27:43 +02:00
Johannes Meyer
faca6d53c8 HostgroupsummaryQuery: Add empty groups to the union
refs #3928
2019-10-11 10:27:43 +02:00
Johannes Meyer
fae60f06bf Revert "Show empty groups with a filter chain too"
This reverts commit fadf12e98a5f612f4475ea7c49d0eec46dffc7de.
2019-10-08 13:39:52 +02:00
Johannes Meyer
0e729bb85b Revert "ServicegroupQuery: Use left joins instead of inner joins"
This reverts commit 23066d2cc4308bf66cb1600c68cee12479b1a0c7.
2019-10-08 13:39:52 +02:00
Johannes Meyer
94b0689b95 Revert "HostgroupQuery: Use left joins instead of inner joins"
This reverts commit 4ef085bdcd55b24deeac071fd65363da35585ac0.
2019-10-08 13:39:52 +02:00
Johannes Meyer
c21867699a ServicestatusQuery: Adjust next_update calculation to respect next_check 2019-10-08 13:21:43 +02:00
Johannes Meyer
b9ea432d35 HoststatusQuery: Adjust next_update calculation to respect next_check 2019-10-08 13:21:43 +02:00
Eric Lippmann
fadf12e98a Show empty groups with a filter chain too 2019-08-14 11:50:14 +02:00
Eric Lippmann
214a34a5a8 Always use subquery filters for subquery targets in the group views 2019-08-13 17:18:50 +02:00
Eric Lippmann
7730058c2c Fix Event Grid PostgreSQL error
PostgreSQL fails with failed to find conversion function from
unknown to text. PostgreSQL won't detect the type of object_type.
Most likely because it's used in a CASE statement and provided by a
subquery:

select case when s.object_type = 'service' then 1 else 0 end from
(select ('service') as object_type) as s;

This commit just removes object_type from the CASE statements because we
don't need them anyway. Recently we've changed the event grid query to
only select hosts or services and not both.
2019-07-30 09:32:59 +02:00
Peter Eckel
718ecd05a7 Fix Icinga 2 version detection
With this commit the version prefix character is treated as optional
which always used to be 'r' or 'v'. But this is gone since Icinga 2
version 2.11.0 RC1.

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
2019-07-30 09:32:17 +02:00
Eric Lippmann
e61cb71c17 Use unique values for combined AND group membership filters 2019-07-30 09:17:25 +02:00
Eric Lippmann
0de923fc5f Support "old" combined group membership filter in subquery filter chains 2019-07-30 09:17:25 +02:00