14190 Commits

Author SHA1 Message Date
Yonas Habteab
0c2215a9f8 Checkable: Use correct timeout for rescheduling remote checks
Previously, the `command#timeout` which by default is `1m`, was used to reschedule
the just sent remote check. However, this results into a bunch of extra checks being
sent to the remote host, even though the first one is still running. That's because
if one want to override the default timeout of the command for a specific host/service,
one has to set the `checkable#check_timeout` attribute to the desired value. So, this
commit makes sure that the `checkable#check_timeout` attribute (if set) is used to
reschedule the remote check.
2025-05-19 14:07:33 +02:00
Yonas Habteab
8a1d9df767
Merge pull request #10070 from Icinga/time-period-schedule-next-check-on-next-transition-9984
If skipped due to time period, schedule next check on next transition
2025-05-19 12:29:09 +02:00
Yonas Habteab
be0ddb158f
Merge pull request #10441 from Icinga/Al2Klimov-patch-7
Markdown: indent 2nd-level <ul> with 4 spaces, not 1
2025-05-16 15:11:43 +02:00
Julian Brost
d1623b5391
Merge pull request #10435 from SpeedD3/itl/vmware.esx/maintenance_mode_state
ITL: add argument maintenance_mode_state to vmware_esx
2025-05-16 15:01:06 +02:00
Yonas Habteab
98ed1b59ab
Merge pull request #10383 from Icinga/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 1 to 4
2025-05-16 14:23:25 +02:00
Alexander Aleksandrovič Klimov
04f69d251a
Merge pull request #10382 from Icinga/dependabot/github_actions/actions/cache-4
Bump actions/cache from 3 to 4
2025-05-16 13:59:47 +02:00
Alexander Aleksandrovič Klimov
72e77177de
Markdown: indent 2nd-level <ul> with 4 spaces, not 1
Neither CLion, nor GitHub or icinga.com differ 0 and 1 spaces before asterisk.
2025-05-16 12:57:56 +02:00
Yonas Habteab
45c651499b
Merge pull request #10379 from Icinga/set-cancel-time-conditionally
IcingaDB: Sync downtime `cancel_time` conditionally
2025-05-16 12:18:20 +02:00
Yonas Habteab
ef63f43b3f GHA: Fetch full git history for windows 2025-05-16 11:35:00 +02:00
dependabot[bot]
cf6c2064a0 Bump actions/checkout from 1 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 1 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v1...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-16 11:33:56 +02:00
dependabot[bot]
946937d6d9
Bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-16 09:32:58 +00:00
Julian Brost
26b320ab92
Merge pull request #10438 from Icinga/Al2Klimov-patch-7
GHA: AUTHORS: use sed(1), not grep(1)
2025-05-16 11:30:20 +02:00
Dirk Wening
908519aa74
ITL: Add argument maintenance_mode_state to vmware_esx 2025-05-16 11:07:06 +02:00
Alexander Aleksandrovič Klimov
018a0c936d
GHA: AUTHORS: use sed(1), not grep(1)
grep(1)'s exit code causes the GHA to fail in contrast to sed(1).
2025-05-16 10:54:24 +02:00
Yonas Habteab
d1f0ffe778
Merge pull request #10433 from Icinga/gha-windows-logs-artifacts
GitHub Actions: Show log files in Windows jobs
2025-05-16 10:40:28 +02:00
Yonas Habteab
83a0f9d217
Merge pull request #10361 from Icinga/reset-no-more-notifications-only-on-recovery
Notification: Reset internal states on (missed)recovery
2025-05-16 09:53:10 +02:00
Yonas Habteab
7acec6fc36 IcingaDB: Set downtime cancel_time conditionally
If the downtime ended automatically `cancel_time` should just be `NULL`
instead of a `0` timestamp.
2025-05-16 09:49:58 +02:00
Yonas Habteab
5ea666a7ad IcingaDB: Don't set cancel_time for downtime start event
It's a downtime start event there's now way the downtime could be
cancelled before it even started.
2025-05-16 09:49:16 +02:00
Alvar Penning
2a79e1695d
AUTHORS, .mailmap: Add Dirk Wening 2025-05-16 09:13:51 +02:00
Julian Brost
abd95a33ca
Merge pull request #10429 from Icinga/selinux-fix
Fix broken SELinux policy on Fedora `>=41` systems
2025-05-14 17:06:36 +02:00
Julian Brost
1a386ad55d
Merge pull request #10265 from Icinga/RedisConnection-spinlock
RedisConnection#Connect(): get rid of spin lock
2025-05-14 15:06:58 +02:00
Julian Brost
5a464afdaa GitHub Actions: Show log files in Windows jobs
If CPack fails, it may write the actual errors to a dedicated log file:

    EXEC : CPack error : Problem running WiX. Please check 'D:/a/icinga2/icinga2/Build/_CPack_Packages/win64/WIX/wix.log' for errors. [D:\a\icinga2\icinga2\Build\PACKAGE.vcxproj]

Show all `*.log` files as part of the job output so that it doesn't get lost.
2025-05-14 14:08:20 +02:00
Alexander A. Klimov
daeab09334 If skipped due to time period, schedule next check on next transition
and not after yet another check interval. Otherwise checks done every 24h may get suppressed due to being re-scheduled outside time period every 24h.
2025-05-14 12:47:34 +02:00
Alexander A. Klimov
2739f7f189 RedisConnection#Connect(): get rid of spin lock
Instead of IoEngine::YieldCurrentCoroutine(yc) until m_Queues.FutureResponseActions.empty(), async-wait a CV which is updated along with m_Queues.FutureResponseActions.
2025-05-14 12:28:11 +02:00
Alexander A. Klimov
060d8b185e Introduce AsioDualEvent 2025-05-14 12:24:28 +02:00
Yonas Habteab
d230e87cf2
Merge pull request #10223 from Icinga/fix-recovery-ack-notifications
Notification: Fix incorrectly dropped recovery & ACK notifications
2025-05-13 17:14:07 +02:00
Yonas Habteab
d750bff193 Notification: Fix incorrectly dropped recovery & ACK notifications
Previously, recovery and ACK notifications were not delivered to users
who weren't notified about the problem state while having a configured
`Problem` type filter. However, since the type filter can also be
configured on the `Notification` object level, this resulted to an
incorrect behaviour. This PR changes the existing logic so that the
recovery and ACK notifications gets dropped only if the `Problem` filter
is configured on both the `User` and `Notification` object levels.
2025-05-13 09:46:35 +02:00
Yonas Habteab
79e5462072
Merge pull request #10432 from Icinga/perfdata-parse-counter-value
Fix PerfdataValue Counter Parsing
2025-05-12 18:42:59 +02:00
Alvar Penning
7e65a60a5d
Fix PerfdataValue Counter Parsing
Ensure that the counter unit of measurement, "c", is parsed correctly
for performance data values again.

A prior refactoring in 720a88c29a489cec91815af49755413202802d7a changed
the parsing logic, resulting in an incorrect behavior for counter units.
By passing the raw input into the l_CsUoMs map first, the "c" UoM is
removed. Moving the explicit counter check before passing the raw unit
into the map resolves this issue.

Fixes #9540.
2025-05-12 16:34:05 +02:00
Julian Brost
aee8fb2045
Merge pull request #10323 from Icinga/doc-11-cli-commands-update
Update Icinga 2 CLI Commands Documentation
2025-05-12 14:39:01 +02:00
Yonas Habteab
241e1f9437 Fix broken SELinux policy on Fedora >=41 systems
`sbindir` can be both `/usr/sbin` or `/usr/bin` depending on the used OS
hence we need to make sure that this pattern matches on both paths.
2025-05-12 13:56:36 +02:00
Yonas Habteab
4596b44171 Reset no_more_notifications on filter mismatch correctly
Previously, if you enable flapping for a Checkable but the corresponding
`Notification` object does not have `FlappingStart` or `FlappingEnd`
types set, the `no_more_notifications` flag wasn't reset to false again.
This commit ensures that this flag is always reset on `Recovery` even
the type filter does not match including when we miss the `Recovery` due
to Flapping state.
2025-05-12 12:03:13 +02:00
Yonas Habteab
9166326876 Notification: Reset notified problem users on flapping end as well 2025-05-12 12:03:13 +02:00
Yonas Habteab
86365a4e2b Notification: Clear last notified state per user on flapping end as well 2025-05-12 12:03:13 +02:00
Yonas Habteab
89f12c2323 Notification: Reset no_more_notifications only on recovery 2025-05-12 12:03:13 +02:00
Yonas Habteab
a53792df31
Merge pull request #10421 from Icinga/doc-08-advanced-topics-checkresult-state-ref
doc/08-advanced-topics.md: Reference CheckResult state
2025-05-12 10:36:44 +02:00
Julian Brost
33824c2acc
Merge pull request #10418 from Icinga/jschmidt/doc-impr-unity-builds-core-dumps
Improvements to core dumps section in developer documentation (and some smaller stuff)
2025-05-05 17:29:15 +02:00
Julian Brost
e34f45cbef
Merge pull request #10430 from Icinga/gha-fix-amazonlinux2023-mariadb-package
GHA: Fix amazonlinux:2023 MariaDB package
2025-05-05 17:27:10 +02:00
Alvar Penning
6f5725576c
GHA: Fix amazonlinux:2023 MariaDB package
Since recently, the amazonlinux:2023 job in the Linux action fails due
to conflichting 'mariadb1*-devel' packages.

> package mariadb1011-devel-3:10.11.11-1.amzn2023.0.1.x86_64 from amazonlinux conflicts with mariadb105-devel provided by mariadb105-devel-3:10.5.16-1.amzn2023.0.7.x86_64 from amazonlinux

It seems like Amazon Linux added mariadb1011 packages next to mariadb105
packages, resulting in a conflict due to the wildcard. On prior runs,
the mariadb105 packages was installed.

This change installs mariadb-connector-c-devel instead of a specific
mariadb1*-devel package, as suggested by the package description.
2025-05-05 14:32:16 +02:00
Alexander Aleksandrovič Klimov
28091a6343
Merge pull request #10384 from Icinga/Al2Klimov-patch-7
GHA: AUTHORS: ignore dependabot[bot]
2025-05-05 11:56:02 +02:00
Alvar
26709e7a65
Merge pull request #10426 from Tqnsls/patch-1
Include "procs-to-show"to ITL check_load command
2025-05-05 08:45:49 +00:00
Johannes Schmidt
88b2831bfa Improve the documentation for generating core dumps 2025-05-05 10:23:22 +02:00
Julian Brost
b2b47981a5
Merge pull request #10422 from Icinga/mktime-dst-consistency
Ensure consistent mktime() DST behavior across different implementations
2025-04-30 16:51:05 +02:00
Silas
41c0148e72
Include "procs-to-show" to ITL check_load command 2025-04-30 15:28:07 +02:00
Julian Brost
3d70720f1b
Merge pull request #10427 from Icinga/notification-load-after
Load Notification objects after User and UserGroup
2025-04-29 17:12:09 +02:00
Julian Brost
cc48c924ae Load Notification objects after User and UserGroup
Notification objects can refer User and Group objects similar to how they can
refer Host and Service objects, so that dependency feels quite natural. Note
that for evaluating most configuration, this order doesn't really matter, the
configuration will successfully evaluate in either case, the difference can be
noticed mainly in more advanced configurations, for example when dynamically
assigning user based on their groups. When accessing user objects from the
Notification object definition (like in the following example), without this
change, only groups configured directly in groups attribute of User objects are
visible and those added via assign clauses in UserGroup objects are missing.
With this commit, these are also visible.

    apply Notification "n" to Host {
        for (var u in get_objects(User)) {
            log(u.name + " -> " + Json.encode(u.groups))
        }

        # [...]
    }
2025-04-29 12:14:46 +02:00
Alexander A. Klimov
331ba1f661 Rename AsioConditionVariable to AsioEvent
The current implementation is rather similar to Python's threading.Event, than to a CV.
2025-04-29 11:39:42 +02:00
Julian Brost
3c9e06972d Don't disable icinga_legacytimeperiod/dst test on Alpine
The test was disabled due to a difference in behavior of mktime() between glibc
and musl. This inconsistency was fixed with the introduction of
Utility::NormalizeTm() and Alpine no longer needs this special case.
2025-04-28 13:48:00 +02:00
Julian Brost
379d7638ed tests: Remove special cases for Windows in icinga_legacytimeperiod/dst
Ideally, Icinga 2 should behave consistenly across platforms. These special
cases only existed because mktime() on Windows behaved differently than the
implementation in glibc. With the introduction of Utility::NormalizeTm(),
there's now consistent behavior and the other expected results for windows are
no longer necessary (ideally, they shouldn't have existed in the first place).
2025-04-28 13:48:00 +02:00
Julian Brost
5404143dee Ensure consistent mktime() DST behavior across different implementations
There are inputs to mktime() where the behavior is not specified and there's
also no single obviously correct behavior. In particular, this affects how
auto-detection of whether DST is in effect is done when tm_isdst = -1 is set
and the time specified does not exist at all or exists twice on that day.

If different implementations are used within an Icinga 2 cluster, that can lead
to inconsistent behavior because different nodes may interpret the same
TimePeriod differently.

This commit introduces a wrapper to mktime(), namely Utility::NormalizeTm()
that implements the behavior provided by glibc. The choice for glibc's behavior
is pretty arbitrary, it was simply picked because most systems that are
officially/fully supported use it (with the only exception being Windows), so
this should give the least possible amount of user-visible changes.

As part of this commit, the closely related helper function mktime_const() is
also moved to Utility::TmToTimestamp() and made a wrapper around the newly
introduced NormalizeTm().
2025-04-28 13:38:55 +02:00