Since #1060, comments/delete and downtimes/delete try to use
`ObjectAuthorization`'s cache properly and override `CommandAction`'s
`isGrantedOnType()`. Though, the filter is applied to the host
and service model as a result, and not to the downtime model. This
way, downtime filters MUST be absolute, just like filters provided
by the search bar. Otherwise `name=downtime-name` will be translated
to e.g. `host.name=downtime-name` which obviously cannot match.
fixes#1245
There are multiple possible outputs for an Icinga DB version. The
package version contain the git tag, with a leading "v". The development
version mimics git-describe(1), including a commit hash separated by a
dash after the semantic version.
The current version comparison uses PHP's builtin version_compare().
This results in leading "v"s to return invalid results. Furthermore, it
treats everything behind the version as an "any string"[^0], which is
smaller than dev, alpha, beta, and so on. Thus, any git-describe(1)
version of Icinga DB 1.4.0 would be considered smaller as 1.4.0.
Fixes#1230.
[^0]: https://www.php.net/manual/en/function.version-compare.php
The old redis schema is incompatible with v1.2.0 hence the
health check should report a critical incident instead.
Also updates the health view to show a proper message.
* RedundancyGroupSummary:
- Columns are same as in DependencyNodeSummary. Column `redundancy_group.state.failed` excluded because not required here.
- Don't sort by default. Sorting the summary is not necessary and even fails for PostgreSQL as it would require adding the column to the GROUP BY clause.
- Introduce new method for(), to easily get the summary query for given group id. Adjust filter. The summary is always for parent (member).
This fundamentally changes the expectation in #1138. But since
we cannot guarantee that Icinga 2 did not actually perform the
action, we also should not retry the command. Otherwise there
may be duplicated downtimes, comments, etc.
- Use the returned value instead, either array or null.
- With https://github.com/Icinga/icinga2/issues/8167 attrs=[] means that no attrs are
fetched at all, and attrs=null means that all available attrs are fetched
Currently, the limit is globally set to 50, hence the short custom
variable names which overlaps with most of the column names will not be
suggested and instead only column names will be suggested. To prevent
this the default limit is split in half and adjusted dynamically based
on available suggestions.
resolves#1094