Commit Graph

13210 Commits

Author SHA1 Message Date
Alexander A. Klimov ce1a122618 Construct string once, not unnecessarily N times 2022-10-17 15:54:02 +02:00
Julian Brost 91cbb856fe
Merge pull request #9521 from Icinga/noop-log-msgs
Logger: don't render log messages which will be disposed anyway
2022-10-11 19:05:03 +02:00
Alexander Aleksandrovič Klimov 363f4d3fde
Merge pull request #9408 from Icinga/bugfix/match-api-permissions-against-join-relations
ObjectQueryHandler: Check user permissions on joined relations
2022-10-11 13:42:27 +02:00
Yonas Habteab a656444d78 RedisConnection: Don't log queries that are going to be discarded 2022-10-11 13:28:08 +02:00
Alexander A. Klimov 0fbb0332a6 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-11 13:28:08 +02:00
Julian Brost 9be02e3f04
Merge pull request #9518 from Icinga/9481
StartUnixWorker(): watch forked child via waitpid(), not SIGCHLD handler
2022-10-10 14:36:52 +02:00
Yonas Habteab 72e6894bbb Evaluate permission filters also on all joined relations 2022-10-10 12:33:33 +02:00
Yonas Habteab 607f7ab5ca ObjectQueryHandler: Check user permissions on joined relations 2022-10-10 12:33:33 +02:00
Yonas Habteab 1bb2d65a8d FilterUtility: Outsource permission matching from CheckPermission() to a separate method 2022-10-10 12:33:33 +02:00
Julian Brost 465da17060
Merge pull request #9407 from Icinga/bugfix/don-not-allow-changing-object-relations-at-runtime
Don't allow to change object navigation fields at runtime
2022-10-10 12:27:57 +02:00
Julian Brost d20f3d7c84
Merge pull request #9533 from Icinga/probot/update-authors/master/e615b297f98b5e0bc62da834b005cd4fed9c3f1c
Update AUTHORS
2022-10-07 17:58:43 +02:00
Alexander A. Klimov 61f7e029cb Replace two-variants enum with bool 2022-10-07 15:14:33 +02:00
icinga-probot[bot] fbff6ee548
Update AUTHORS 2022-10-07 11:31:42 +00:00
Fabian Werner e615b297f9
[ITL] Added some ignore options for check_ssl_cert (#9512) 2022-10-07 11:31:28 +00:00
Julian Brost 87a4925997
Merge pull request #9519 from Icinga/utf8cp
Utility::ValidateUTF8(): move a string instead of copying a vector
2022-10-07 10:21:37 +02:00
Julian Brost 2a4dc083ae
Merge pull request #9524 from Icinga/introduce-object-idx
Introduce object identifier attr
2022-10-07 10:19:59 +02:00
Julian Brost 0ed9c09a1d
Merge pull request #9513 from Icinga/9501
Icinga DB: on every check result update state only 1x, not 3x in a row
2022-10-07 10:18:56 +02:00
Yonas Habteab 85c77bd878 IcingaDB: Cache generated object hash 2022-09-12 17:23:06 +02:00
Yonas Habteab 07e60c1961 ConfigObject: Introduce new `icingadb_identifier` attr 2022-09-12 17:22:57 +02:00
Yonas Habteab 28c29c1fbc Don't allow to change object parent,host/service_name at runtime 2022-09-09 18:26:28 +02:00
Alexander A. Klimov a6b36a2d7b Utility::ValidateUTF8(): move a string instead of copying a vector
less malloc() = more speed

Especially as JsonEncode() validates every single input string.
2022-09-09 10:50:42 +02:00
Julian Brost 14e4f6b921
Merge pull request #9517 from Icinga/bugfix/do-not-always-decrease-frame-depth
Expression: Decrease `frame.Depth` only when calling `IncreaseStackDe…
2022-09-07 13:55:50 +02:00
Alexander A. Klimov 22bfcf9ac5 icinga2 daemon: remove no-op SIGCHLD handling
1. Don't set a custom handler for SIGCHLD (in the umbrella process)
   as that handler doesn't actually handle SIGCHLD anymore
2. Don't reset the SIGCHLD handler (in the worker process)
   as there's nothing to reset anymore due to the above change
3. Don't block SIGCHLD across fork(2) as its handler doesn't change anymore
   due to the above changes
2022-09-07 12:12:09 +02:00
Alexander A. Klimov 3de714489c Remove unused UnixWorkerState::Failed 2022-09-07 12:08:33 +02:00
Alexander A. Klimov df9008bfc4 StartUnixWorker(): watch forked child via waitpid(), not SIGCHLD handler
Before:

On SIGCHLD from the forked worker the umbrella process sets a failure flag.
StartUnixWorker() recognises that and does waitpid(), failure message, etc..
On OpenBSD we can't tell the signal source, so we always set the failure flag.
That's not how our IPC shall work, that breaks the IPC sooner or later.

After:

No SIGCHLD handling and no failure flag setting.
Instead StartUnixWorker()'s wait loop uses waitpid(x,y,WNOHANG)
to avoid false positives while watching the forked worker.
2022-09-07 11:46:46 +02:00
Yonas Habteab 31785b48fd Expression: Decrease `frame.Depth` only when calling `IncreaseStackDepth()` succeeds
This ensures that `frame.Depth` is only decreased when preceding `frame.IncreaseStackDepth()` callee was successful.
This way, `frame.Depth` will have the same depth prior to and after evaluating a frame.
2022-09-07 09:41:16 +02:00
Julian Brost 86b63a57ae
Merge pull request #9514 from Icinga/bugfix/validate-array-types-correctly
ClassCompiler: Validate field types -> Icinga type names correctly
2022-09-06 18:14:43 +02:00
Alexander A. Klimov 5e9f95c007 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-09-06 10:10:14 +02:00
Yonas Habteab aa702b050c ClassCompiler: Validate field types -> Icinga Name correctly
When the classcompiler is validating/transforming field types -> Icinga type names, it is currently returning
Icinga `Number` type for field type of `bool`, which is actually wrong. This PR ensures to always transform
into the correct Icinga type names.
2022-09-05 17:16:53 +02:00
Alexander Aleksandrovič Klimov 3a8abdcc3b
Merge pull request #9500 from Icinga/bugfix/mailmap-lk
Update .mailmap
2022-08-26 15:49:46 +02:00
Julian Brost 06b64e32f4 Update .mailmap 2022-08-26 09:48:09 +02:00
Lorenz 67b025f69b
Add check_disk option to add inode numbers into perfdata (#9494) 2022-08-25 17:33:11 +02:00
Julian Brost 643e9cd48b
Merge pull request #9489 from Icinga/cxx-noext
Compile with -std=c++YY, not -std=gnu++YY, again
2022-08-19 09:46:00 +02:00
Alexander Aleksandrovič Klimov 7d64fbf8f6
Merge pull request #9433 from Icinga/bugfix/schedule-downtime-docs-duration
Docs: remove duration from schedule-downtime example
2022-08-16 16:05:53 +02:00
Alexander A. Klimov 797da46f1e Compile with -std=c++YY, not -std=gnu++YY, again 2022-08-15 17:33:54 +02:00
Julian Brost ad58106226
Merge pull request #9133 from Icinga/feature/gcc63
Require C++14 and GCC 6.3+
2022-08-12 14:17:12 +02:00
Julian Brost c59cdde72b
Merge pull request #9484 from Icinga/probot/sync-changelog/master/242f356259f0716e83fa2ae0c2b6daef7432f09b
CHANGELOG.md: add v2.13.5
2022-08-12 13:41:32 +02:00
Julian Brost d3cca0e621
Merge pull request #9409 from Icinga/feature/disallow-empty-object-names
Disallow empty object names
2022-08-11 16:53:28 +02:00
Alexander A. Klimov 2b53c47a3f CHANGELOG.md: add v2.13.5 2022-08-11 12:33:28 +00:00
Alexander Aleksandrovič Klimov 242f356259
Merge pull request #9477 from Icinga/docs/add-rhel9
Docs: Add RHEL 9 installation instructions
2022-08-11 14:33:15 +02:00
Henrik Triem de7e571c09 Docs: Add RHEL 9 installation instructions 2022-08-11 09:59:49 +02:00
Alexander Aleksandrovič Klimov c3074753aa
Merge pull request #9479 from Icinga/9478
IcingaDB::SendCustomVarsChanged(): don't delete custom vars of not synced types
2022-08-10 22:22:14 +02:00
Alexander A. Klimov a2362ebf17 IcingaDB::VersionChangedHandler(): don't handle not synced types
not to surprise (and crash) the Icinga DB daemon with unknown types.
2022-08-10 13:24:44 +02:00
Alexander A. Klimov 32871ca40c 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 11:40:53 +02:00
Julian Brost 9ffcc80e9a
Merge pull request #9476 from Icinga/probot/update-authors/master/2b76351347c391cc0964783297cb37a65a3c5955
Update AUTHORS
2022-08-09 09:18:05 +02:00
icinga-probot[bot] 898b36a040
Update AUTHORS 2022-08-08 16:54:15 +00:00
Alexander Aleksandrovič Klimov 2b76351347
Merge pull request #9472 from mocdaniel/9471-rhel8-installation-docs
Updated RHEL8 installation documentation
2022-08-08 18:54:04 +02:00
Daniel Bodky f91d3c8532
Updated RHEL8 installation documentation 2022-08-05 12:18:47 +02:00
Julian Brost 409bda109c
Merge pull request #9444 from Icinga/bugfix/add-missing-redis-and-mysql-selinux-policy
Add missing Redis & Mysql unix socket SELinux policy
2022-08-05 10:41:38 +02:00
Julian Brost fb6331d2c1
Merge pull request #9468 from Icinga/probot/update-authors/master/03f60bbd1c1f01d60cd786280f66a248757a38b6
Update AUTHORS
2022-08-02 08:52:56 +02:00