Commit Graph

13132 Commits

Author SHA1 Message Date
Alexander A. Klimov e4a36bc217 Introduce Icinga DB check (like the IDO one) 2022-06-23 11:14:31 +02:00
Alexander A. Klimov 88c8d29ee6 Remove Icinga DB perfdata from Icinga check
as the Icinga DB check already yields it.
2022-06-22 13:25:29 +02:00
icinga-probot[bot] fd1f786fbe
Update AUTHORS 2022-06-22 10:52:23 +00:00
Christopher Peterson 286e84bb56
Add new option `-a` to the `mem` CheckCommand (#9385)
* To the `mem` CheckCommand, add support for `check_mem.pl`'s new argument `-a`

`-a           Check AVAILABLE memory (only Linux)`

* Update documentation for the CheckCommand `mem` to include the new `mem_available` option
2022-06-22 12:52:11 +02:00
Alexander Aleksandrovič Klimov ff6cdc2c71
Merge pull request #9296 from Napsty/nrpe-v3
Add nrpe v3 parameter in ITL
2022-06-22 12:40:24 +02:00
Julian Brost 356fe40582
Merge pull request #9257 from Icinga/bugfix/fix-doc-troubleshooting-zones-in-zones-section
Doc: Enhance Zones in Zones troubleshooting
2022-06-21 13:06:04 +02:00
Yonas Habteab 8a02eab411 Doc: Enhance Zones in Zones troubleshooting 2022-06-21 09:33:23 +02:00
Alexander Aleksandrovič Klimov dc571e4d0a
Merge pull request #9404 from Icinga/feature/icingadb-no-ca-error-message
Icinga DB: make error message more helpful if API isn't set up
2022-06-20 19:36:26 +02:00
Julian Brost 6b4681ee9e Icinga DB: make error message more helpful if API isn't set up 2022-06-20 14:57:19 +02:00
Alexander A. Klimov 8eef51afeb Introduce IcingaDB::AddKvsToMap() 2022-06-20 13:47:39 +02:00
Alexander A. Klimov 2c3d2f8b87 RedisConnection::ReadRESP(): *-1\r\n is null, not [ ] 2022-06-20 13:47:39 +02:00
Alexander Aleksandrovič Klimov 4522522444
Merge pull request #9362 from Icinga/bugfix/remove-redundant-serialization
Remove redundant call to Serialize() in ConfigItem::Commit()
2022-06-15 09:34:38 +02:00
Alexander Aleksandrovič Klimov ca394efe83
Merge pull request #9392 from Icinga/bugfix/icingadb-env-id-init
Icinga DB: initialize environment ID during config validation
2022-06-13 15:16:07 +02:00
Julian Brost ad218c9a12 Icinga DB: initialize environment ID during config validation
IcingaDB may receive callbacks from Boost signals before being fully started.
This resulted in situations where m_EnvironmentId was used before it was
initialized properly. This is fixed by initializing it earlier (during the
config validation stage). However, at this stage, it should not yet write to
disk, therefore, persisting the environment ID to disk is delayed until later
in the startup process.

Initializing at this stage has an extra benefit: if there is an error for some
reason (possibly corrupt icingadb.env file), this now shows up as a nice error
during config validation.

Additionally, this replaces the use of std::call_once with std::mutex due to
bug in libstdc++ (see inline comment for reference).
2022-06-10 14:19:58 +02:00
Julian Brost 9cd820d531
Merge pull request #9384 from Icinga/feature/add-name-suffix-to-columns-referring-to-name
IcingaDB: Add `_name` suffix to columns referring to name
2022-06-09 09:38:25 +02:00
Yonas Habteab 45f536ca06 Bump Redis schema version to 5 2022-06-07 12:55:12 +02:00
Yonas Habteab 92becec37f IcingaDB: Add `_name` suffix to columns referring to name 2022-05-31 16:41:40 +02:00
Eric Lippmann 18c8b4ad54
Merge pull request #9371 from Icinga/bugfix/icingadb-command-arguments-null
IcingaDB: handle null (Empty) for value/set_if/separator in command arguments
2022-05-23 16:01:49 +02:00
Julian Brost 3220fecd4c
Merge pull request #7919 from Icinga/feature/parameter-delimiters-check-execution-6277
Introduce Command#arguments[].separator
2022-05-23 13:23:36 +02:00
Julian Brost f110e26635 IcingaDB: handle null (Empty) for value/set_if/separator in command arguments
Icinga 2 treats null (Empty) as if the corresponding attribute is not
specified. However, without this commit, it would serialize the value as "null"
(i.e. type string), so that it ends up in the database as this string instead
of NULL. This commit adds handling for ValueEmpty so that is serialized as JSON
null value and ends up in the database as NULL.
2022-05-23 11:53:41 +02:00
Alexander A. Klimov 069c3968d9 Introduce Command#arguments[].sep
... for letting check commands produce argv like --key=value,
not just --key value.

refs #6277
2022-05-11 17:50:12 +02:00
Julian Brost f46d474e2f
Merge pull request #9368 from Icinga/probot/update-authors/master/4184dcd62c22124f08733f43b682dbb74bcc28f4
Update AUTHORS
2022-05-05 19:55:46 +02:00
icinga-probot[bot] c602c5e037
Update AUTHORS 2022-05-05 13:30:22 +00:00
Julian Brost 4184dcd62c
Merge pull request #9354 from WuerthPhoenix/feature/return-correct-status-in-process-check-result-api
Return correct status codes in process-check-result API
2022-05-05 15:30:09 +02:00
Julian Brost f610289b3f
Merge pull request #9364 from Icinga/bugfix/atomic-members
Replace `EventuallyAtomic` with `AtomicOrLocked` which falls back to a mutex
2022-05-05 13:19:03 +02:00
Julian Brost abe2dfa763 Replace EventuallyAtomic with AtomicOrLocked which falls back to a mutex
Apparently there was a reason for making the members of generated classes
atomic. However, this was only done for some types, others were still accessed
using non-atomic operations. For members of type T::Ptr (i.e.  intrusive_ptr<T>),
this can result in a double free when multiple threads access the same variable
and at least one of them writes to the variable.

This commit makes use of std::atomic<T> for more T (it removes the additional
constraint sizeof(T) <= sizeof(void*)) and uses a type including a mutex for
load and store operations as a fallback.
2022-05-03 12:02:46 +02:00
Julian Brost 2dcdae4470 Remove redundant call to Serialize() in ConfigItem::Commit()
The very same object is already serialized a few lines above, the result is
even stored in a variable, but that variable was not used before. Simply using
this variable results in a noticeable improvement of config validation times.
2022-04-28 17:09:16 +02:00
Julian Brost a51c004f54
Merge pull request #9358 from Icinga/feature/windows-boost-1.79
Windows: update boost to version 1.79.0
2022-04-27 13:54:08 +02:00
Julian Brost 4de986de73 Windows: update boost to version 1.79.0 2022-04-27 12:36:32 +02:00
Damiano Chini 9d9810b44d Return correct status codes in process-check-result API 2022-04-26 13:33:59 +02:00
Julian Brost 370df831c4
Merge pull request #9351 from Icinga/probot/sync-changelog/master/67dfefe0369191b791f085e928b6e3dbe6a01dbc
CHANGELOG.md: add v2.13.3
2022-04-20 16:56:13 +02:00
Julian Brost e2fe032b74 CHANGELOG.md: add v2.13.3 2022-04-20 09:18:16 +00:00
Alexander Aleksandrovič Klimov 67dfefe036
Merge pull request #9348 from Icinga/bugfix/suppressed-notifications-host-dependency
Take host state into account when sending suppressed notifications
2022-04-20 11:18:03 +02:00
Julian Brost 51cd7e7b0b Take host state into account when sending suppressed notifications
Checkable::FireSuppressedNotifications() compares the time of the current
checkable with the last recovery time of parents to avoid notification right
after a parent recovered and before the current checkable was checked.

This commit makes this check also include to host if the checkable is a
service.  This makes the behavior consistent with the documentation that states
there is an implicit dependency on the host (which isn't realized as implicitly
generating a Dependency object unfortunately).
2022-04-19 16:13:15 +02:00
Julian Brost 9644effe86
Merge pull request #9342 from Icinga/Al2Klimov-patch-4
GHA: add Fedora 36
2022-04-13 09:37:34 +02:00
Julian Brost b7dfeaa3cc
Merge pull request #9341 from Icinga/Al2Klimov-patch-3
GHA: add Ubuntu jammy
2022-04-13 09:37:14 +02:00
Alexander Aleksandrovič Klimov 12f9a9f59f
GHA: add Fedora 36 2022-04-12 17:20:26 +02:00
Alexander Aleksandrovič Klimov 5a8eb8f49a
GHA: add Ubuntu jammy 2022-04-12 17:18:51 +02:00
Julian Brost 178aaaeca9
Merge pull request #9332 from Icinga/bugfix/compare-cluster-tickets-in-constant-time
Compare cluster tickets in constant time
2022-04-11 15:32:32 +02:00
Julian Brost b24a2fa2a5
Merge pull request #9179 from Icinga/Al2Klimov-patch-3
Let new cluster certificates expire after 397 days, not 15 years
2022-04-11 15:29:05 +02:00
Julian Brost 0e880048ee
Merge pull request #7961 from Icinga/bugfix/startup-log
Place startup.log and status in /var/lib/icinga2/api, not /var/lib/icinga2/api/zones-stage
2022-04-11 14:41:07 +02:00
Alexander A. Klimov b15763bd86 Compare cluster tickets in constant time
Just to be sure.
2022-04-11 11:17:05 +02:00
Alexander A. Klimov 08a23f4035 Write also /var/lib/icinga2/api/zones-stage-startup-last-failed.log
in addition to /var/lib/icinga2/api/zones-stage-startup.log
to prevent the next success to overwrite the last failure.
2022-04-11 11:14:42 +02:00
Alexander A. Klimov c9e4c016e0 Protect ApiListener#m_SSLContext with a mutex 2022-04-11 11:02:45 +02:00
Alexander A. Klimov e490883577 Renew certificates also periodically 2022-04-11 11:02:39 +02:00
Alexander Aleksandrovič Klimov e589833352
Merge pull request #9324 from Icinga/bugfix/release-workflow-windows-deps
Windows packaging repo no longer requires update for newer dependencies
2022-04-07 15:56:55 +02:00
Alexander Aleksandrovič Klimov 39d642af75
Merge pull request #9321 from Icinga/perfdata-resume-signal
Perfdata writers: disconnect handlers from signals in Pause()
2022-04-07 15:51:02 +02:00
Julian Brost 1e1f9bb488
Merge pull request #9323 from Icinga/boost-1.78
Windows: bump Boost and OpenSSL
2022-04-07 15:49:54 +02:00
Alexander A. Klimov ce6d1b8961 Place startup.log and status in /var/lib/icinga2/api, not /var/lib/icinga2/api/zones-stage
not to loose them.
2022-04-07 11:24:24 +02:00
Julian Brost 3f16d12115
Windows packaging repo no longer requires update for newer dependencies
Since commit 07b16da250 in the windows-icinga2 packaging repo, the versions of build dependencies are controlled from this repo (icinga2). So the other repo no longer needs to be updated for newer dependencies.
2022-04-07 11:09:34 +02:00