13095 Commits

Author SHA1 Message Date
Alexander A. Klimov
a1bda3300e Fix compile error on Solaris 11.4
by not using LOG_FTP which is not defined there.
2023-02-15 10:48:05 +01:00
Julian Brost
6ef67432ef
Merge pull request #9568 from Icinga/feature/release-2.13.6
Release 2.13.6
v2.13.6
2022-11-07 16:08:33 +01:00
Julian Brost
39117378cd
Merge pull request #9567 from Icinga/bugfix/openssl-1.1.1s-2.13
Windows: update bundled OpenSSL to version 1.1.1s
2022-11-07 13:40:03 +01:00
Julian Brost
d8b2c2db09 Release 2.13.6 2022-11-07 11:40:49 +01:00
Julian Brost
3bb3720465
Merge pull request #9565 from Icinga/targeted-apply-rules-2.13
Separately handle apply rules targetting only specific parent objects
2022-11-04 19:07:43 +01:00
Julian Brost
2916c96bd9 Windows: update bundled OpenSSL to version 1.1.1s 2022-11-04 13:37:29 +01:00
Yonas Habteab
a15bbfe913 Use service short name for evaluating targeted service rules 2022-11-04 12:47:41 +01:00
Yonas Habteab
e29de04687 Avoid evaluating the same filter twice for the same target 2022-11-04 12:47:41 +01:00
Alexander A. Klimov
cc67510063 ApplyRule::RuleMap: reduce complexity, save unnecessary lookups 2022-11-04 12:47:41 +01:00
Alexander A. Klimov
0bf093af14 Targeted apply rules: don't unnecessarily eval filter 2022-11-04 12:47:41 +01:00
Alexander A. Klimov
09d810dbd9 VariableExpression#GetVariable(): return by const ref not to unnecessarily malloc() 2022-11-04 12:47:41 +01:00
Alexander A. Klimov
840bfb6be1 Unify storages of regular/targeted apply rules: std::vector<ApplyRule::Ptr> 2022-11-04 12:47:41 +01:00
Alexander A. Klimov
1935137a8d Separately handle apply rules targetting only specific parent objects
not to unnecessarily run e.g. the filter assign where host.name=="example.com"
for all hosts being not example.com.
2022-11-04 12:47:41 +01:00
Alexander A. Klimov
3d2a6bbfb1 Allow hashmaps of String 2022-11-04 12:47:41 +01:00
Alexander A. Klimov
80ee597b72 Allow intrusive pointers to ApplyRule 2022-11-04 12:47:41 +01:00
Julian Brost
54a448a736
Merge pull request #9559 from Icinga/apply-rules-lookup-213
Lookup apply rules faster by Type*, not String and by map instead of ==/!=
2022-11-04 12:20:28 +01:00
Alexander A. Klimov
cf3e02243e Remove unused ApplyRule#m_TargetType 2022-11-02 11:06:12 +01:00
Alexander A. Klimov
fcedb01d0d Lookup apply rules faster by Type*, not String and by map instead of ==/!=
1. The lookup of apply rules per source type now implies
   no String(const char*) (no malloc()) and just pointer (uint64) comparisions
2. Apply rules are now also grouped by target type via a nested map, that obsoletes
   checking the target type while iterating over all rules per source type
2022-11-02 11:06:12 +01:00
Alexander A. Klimov
7f50955674 ApplyRule::GetTargetTypes(): return by const ref not to malloc() 2022-11-02 11:00:47 +01:00
Julian Brost
cdd531445a
Merge pull request #9558 from Icinga/context-evaluating-apply-rules-for-host-213
Construct string once, not unnecessarily N times
2022-11-02 10:48:57 +01:00
Julian Brost
2e02bb52f8
Merge pull request #9561 from Icinga/match-api-permissions-against-join-relations
Match api permissions against joined relations
2022-11-02 10:46:54 +01:00
Julian Brost
2f22be398b
Merge pull request #9560 from Icinga/handle-on-error-213
ConfigItem: Fix infinite recursion caused by `ignore_on_error`
2022-11-02 10:37:56 +01:00
Julian Brost
59b3ed5154
Merge pull request #9562 from Icinga/boost180
Bump Boost v1.79 -> v1.80
2022-11-02 10:36:59 +01:00
Julian Brost
46dce8a025
Merge pull request #9550 from Icinga/2.13-idb-perf
Backport Icinga DB performance improvements
2022-10-31 13:33:44 +01:00
Alexander A. Klimov
b731bcf511 Bump Boost v1.79 -> v1.80 2022-10-31 13:04:16 +01:00
Yonas Habteab
adc42e101d Evaluate permission filters also on all joined relations 2022-10-31 13:01:12 +01:00
Yonas Habteab
02524f5993 ObjectQueryHandler: Check user permissions on joined relations 2022-10-31 13:01:12 +01:00
Yonas Habteab
21b55cb1ac FilterUtility: Outsource permission matching from CheckPermission() to a separate method 2022-10-31 13:01:12 +01:00
Yonas Habteab
bbca13d788 ConfigItem: Don't add items to the new items vector before committing
This also improves the performance a bit, as we longer have to iterate over the items
and copy them into the new items vector.
2022-10-31 12:55:42 +01:00
Yonas Habteab
2adc0bd042 ConfigItem: Fix infinite recursion caused by ignore_on_error when committing an item
When committing an item with `ignore_on_error` flag set fails, the `Commit()` method only returns `nullptr`
and the current item is not being dropped from `m_Items`. `CommittNewItems()` also doesn't check the return
value of `Commit()` but just continues and tries to commit all items from `m_Items` in recursive call. Since
this corrupt item is never removed from `m_Items`, it ends up in an endless recursion till it finally crashes.
2022-10-31 12:55:42 +01:00
Alexander A. Klimov
17c652d8dd Construct string once, not unnecessarily N times 2022-10-31 12:40:59 +01:00
Yonas Habteab
a4de67d558 RedisConnection: Don't log queries that are going to be discarded 2022-10-26 11:55:10 +02:00
Alexander A. Klimov
de60eb445b Logger: don't render log messages which will be disposed anyway
by caching the total minimum log severity of all loggers in a
"global variable" and whether a message's severity is large enough for any of
the loggers in a per-message no-op flag.
2022-10-26 11:55:10 +02:00
Alexander A. Klimov
865c5b8365 Utility::ValidateUTF8(): move a string instead of copying a vector
less malloc() = more speed

Especially as JsonEncode() validates every single input string.
2022-10-26 11:55:10 +02:00
Alexander A. Klimov
2754895c11 Icinga DB: on every check result update state only 1x, not 3x in a row
Before (time: vertical, stack: horizontal):

* Checkable::ExecuteCheck
  * Checkable::UpdateNextCheck
    * IcingaDB::NextCheckChangedHandler
      * HSET icinga:host:state
      * HSET icinga:checksum:host:state
      * ZADD icinga:nextupdate:host
  * RandomCheckTask::ScriptFunc
    * Checkable::ProcessCheckResult
      * Checkable::UpdateNextCheck
        * IcingaDB::NextCheckChangedHandler
          * HSET icinga:host:state
          * HSET icinga:checksum:host:state
          * ZADD icinga:nextupdate:host
      * IcingaDB::NewCheckResultHandler
        * HSET icinga:host:state
        * HSET icinga:checksum:host:state
        * ZADD icinga:nextupdate:host
  * IcingaDB::StateChangeHandler
    * XADD icinga:runtime:state
    * IcingaDB::ForwardHistoryEntries
      * XADD icinga:history:stream:state

After:

* Checkable::ExecuteCheck
  * Checkable::UpdateNextCheck
  * RandomCheckTask::ScriptFunc
    * Checkable::ProcessCheckResult
      * Checkable::UpdateNextCheck
      * IcingaDB::NewCheckResultHandler
        * HSET icinga:host:state
        * HSET icinga:checksum:host:state
        * ZADD icinga:nextupdate:host
  * IcingaDB::StateChangeHandler
    * XADD icinga:runtime:state
    * IcingaDB::ForwardHistoryEntries
      * XADD icinga:history:stream:state

The first state + nextupdate (for overdue) update comes from next_check being
set to now + interval immediately before doing the actual check (not to trigger
it twice). This update is not only not important for the end user, but even
inappropriate. The end user SHALL see next_check being e.g. in -4s, not 5m, as
the check is running at the moment.

The second one is just redundant as IcingaDB::NewCheckResultHandler (the third
one) is called anyway and will update state + nextupdate as well.
2022-10-26 11:55:10 +02:00
Alexander Aleksandrovič Klimov
1b2875dc45
Merge pull request #9483 from Icinga/probot/update-authors/support/2.13/89785c39bd08e8805776ae25342b93108d676b8a
Update AUTHORS
v2.13.5
2022-08-11 10:51:55 +02:00
icinga-probot[bot]
3699b93793
Update AUTHORS 2022-08-11 08:51:17 +00:00
Alexander Aleksandrovič Klimov
89785c39bd
Merge pull request #9482 from Icinga/9477-2.13
Docs: Add RHEL 9 installation instructions
2022-08-11 10:51:02 +02:00
Alexander A. Klimov
4424ecce36 Update CHANGELOG 2022-08-11 10:42:40 +02:00
Henrik Triem
9a78b2c64d Docs: Add RHEL 9 installation instructions 2022-08-11 10:35:58 +02:00
Daniel Bodky
718c9d9ae6 Updated RHEL8 installation documentation 2022-08-11 10:35:58 +02:00
Alexander Aleksandrovič Klimov
a8a05b5e6d
Merge pull request #9480 from Icinga/9478-2.13
IcingaDB::SendCustomVarsChanged(): don't delete custom vars of not synced types
2022-08-10 22:01:23 +02:00
Alexander A. Klimov
46696b708d Update CHANGELOG 2022-08-10 17:09:25 +02:00
Alexander A. Klimov
ea4b819480 IcingaDB::VersionChangedHandler(): don't handle not synced types
not to surprise (and crash) the Icinga DB daemon with unknown types.
2022-08-10 17:04:29 +02:00
Alexander A. Klimov
ac57ed6cb4 IcingaDB::SendCustomVarsChanged(): don't delete custom vars of not synced types
not to surprise (and crash) the Icinga DB daemon with unknown types.
2022-08-10 17:04:29 +02:00
Julian Brost
a6d2970604
Merge pull request #9474 from Icinga/2.13.5
Icinga v2.13.5
2022-08-08 09:16:02 +02:00
Alexander Aleksandrovič Klimov
d3c6d4c692
Merge pull request #9473 from Icinga/9444
Add missing IcingaDB Redis SELinux policy
2022-08-05 20:56:46 +02:00
Alexander A. Klimov
4491d5c490 Icinga v2.13.5 2022-08-05 17:26:38 +02:00
Yonas Habteab
f53499b09f Add missing IcingaDB Redis SELinux policy 2022-08-05 16:00:46 +02:00
Julian Brost
1a2ee1241a
Merge pull request #9467 from Icinga/flush-state-file-213
Dump state file atomically not to corrupt it
2022-08-02 09:21:07 +02:00