14330 Commits

Author SHA1 Message Date
Johannes Schmidt
d587bca3bf Add unit-tests for HttpServerConnection and HTTP message classes 2025-07-23 12:01:50 +02:00
Johannes Schmidt
8acf0cc0c7 Make inherited protected functions of ApiListener public
This is needed so it's possible to manually add an ApiListener object
for the purpose of unit-testing.
2025-07-23 12:01:50 +02:00
Johannes Schmidt
d59296b9fd Refactor ObjectQueryHandler to use new JSON stream encoder 2025-07-23 12:01:50 +02:00
Johannes Schmidt
e26428f0ea Detect client-side shutdown of TLS stream 2025-07-23 12:01:46 +02:00
Johannes Schmidt
af78ca02fe Remove extra parameters from HTTP handler signature
These parameters are no longer needed since they were only used
by EventsHandler which was refactored in an earlier commit.
2025-07-23 10:22:38 +02:00
Johannes Schmidt
e17c76e934 Refactor EventsHandler to stream responses via chunked encoding 2025-07-23 10:22:38 +02:00
Johannes Schmidt
34cb20b242 Use new HTTP message classes in HttpServerConnection and Handlers 2025-07-23 10:22:38 +02:00
Johannes Schmidt
3be451a621 Add HttpRequest and HttpResponse classes 2025-07-23 10:22:38 +02:00
Julian Brost
c28076a45b
Merge pull request #10507 from Icinga/RHEL10
GHA: add Rocky Linux 10 as an approximation of RHEL 10
2025-07-23 10:15:04 +02:00
Alexander A. Klimov
37f8e7ec01 GHA: add RHEL 10 2025-07-22 16:36:37 +02:00
Julian Brost
aeb2550ccb
Merge pull request #10508 from Icinga/SLES15.7
GHA: add SLES 15.7
2025-07-22 13:53:32 +02:00
Julian Brost
91faf28106
Merge pull request #10509 from Icinga/Ubuntu25.04
GHA: add Ubuntu 25.04
2025-07-22 13:52:55 +02:00
Julian Brost
00901192df Merge pull request #10506 from Icinga/Fedora42
GHA: add Fedora 42
2025-07-22 13:52:31 +02:00
Alexander Aleksandrovič Klimov
1197672aad
GHA: add Ubuntu 25.04 2025-07-22 10:59:45 +02:00
Alexander Aleksandrovič Klimov
5c5785acb8
GHA: add SLES 15.7 2025-07-22 10:59:34 +02:00
Alexander Aleksandrovič Klimov
054149fe08
GHA: add Fedora 42 2025-07-22 10:59:19 +02:00
Julian Brost
827f85c327
Merge pull request #10387 from Icinga/cnt-msg
Introduce Endpoint#messages_received_per_type
2025-07-16 17:29:24 +02:00
Julian Brost
8d15e7ff9a
Merge pull request #10414 from Icinga/support-json-serialization-into-ostream
Support JSON serialization into any stream like objects
2025-07-15 09:57:24 +02:00
Julian Brost
1f15f0ff07 JsonEncoder: wrap writer for flushing
This commit intruduces a small helper class that wraps any writer and
provides a flush operation that performs the corresponding action if the
writer is an AsyncJsonWriter and does nothing otherwise.
2025-07-11 16:10:22 +02:00
Yonas Habteab
82b80e24c1 fix comment 2025-07-11 14:05:54 +02:00
Yonas Habteab
cd1ab7548c Rename AsyncJsonWriter::Flush() -> MayFlush() to reflect its usage 2025-07-11 13:55:33 +02:00
Yonas Habteab
89418f38ee JsonEncoder: let the serializer replace invalid UTF-8 characters
Replacing invalid UTF-8 characters beforehand by our selves doesn't make
any sense, the serializer can literally perform the same replacement ops
with the exact same Unicode replacement character (U+FFFD) on its own.
So, why not just use it directly? Instead of wasting memory on a temporary
`String` object to always UTF-8 validate every and each value, we just
use the serializer to directly to dump the replaced char (if any) into
the output writer. No memory waste, no fuss!
2025-07-10 18:09:21 +02:00
Yonas Habteab
dad4c0889f JsonEncoder: lock olock conditionally & flush output regularly 2025-07-10 18:09:21 +02:00
Yonas Habteab
398b5e3193 Implement LockIfRequired() method for Namespace, Dictionary & Array 2025-07-10 18:09:21 +02:00
Yonas Habteab
57726fbb66 Do not require olock on frozen Namespace, Dictionary & Array 2025-07-10 18:09:21 +02:00
Yonas Habteab
2461e0415d Introduce JsonEncode helper function
It's just a wrapper around the `JsonEncoder` class to simplify its usage.
2025-07-10 18:09:21 +02:00
Yonas Habteab
9dd2e2a3ec Introduce JsonEncoder class 2025-07-10 18:09:21 +02:00
Alexander Aleksandrovič Klimov
a3ab7dc2dc
Merge pull request #10501 from Icinga/Al2Klimov-patch-3
Fix typo
2025-07-10 13:17:22 +02:00
Alexander Aleksandrovič Klimov
be6844b400
Fix typo 2025-07-10 11:10:35 +02:00
Lorenz Kästle
60fafcb18d
Add plain fping CheckCommand to ITL 2025-07-09 13:24:11 +00:00
Yonas Habteab
1c61bced03 Introduce AsyncJsonWriter output adapter interface 2025-07-09 13:41:15 +02:00
Yonas Habteab
8ef921aa5e Implement bool operator for ObjectLock 2025-07-08 18:24:16 +02:00
Yonas Habteab
4c0628c24d Allow to defer lock on ObjectLock 2025-07-08 18:24:16 +02:00
Yonas Habteab
455d6fcde1 Introduce ValueGenerator class 2025-07-08 18:24:16 +02:00
Yonas Habteab
241cf08263
Merge pull request #10499 from Icinga/remove-override-frozen
No longer allow overriding the frozen attribute of containers
2025-07-08 17:22:58 +02:00
Julian Brost
0ebcd2662d No longer allow overriding the frozen attribute of containers
The Array, Dictionary, and Namespace types provide a Freeze() method that makes
them read-only. So far, there was the possibility to call some methods with
`overrideFrozen=true` which would then bypass the corresponding check and allow
modification of the data structures nonetheless.

With 24b57f0d3a222835178e88489eabd595755ed883, this possibility was already
removed from the Namespace type. However, for interface compatibility, it kept
the parameter and just ignores it, throwing an exception on any modification on
a frozen instance.

The only place using `overrideFrozen` was processing of the `-D`/`--define`
command line flag that allows setting additional variables in the DSL. At the
time it is evaluated, there are no user-created data structures yet that could
be frozen, so the only frozen objects that could be encountered are Namespaces
(Icinga doesn't freeze other types by itself) and for these, `overrideFrozen`
already has no effect.

Hence, there is no harm in removing `overrideFrozen` altogether. This
simplifies the code and also means that frozen objects are now indeed read-only
without exceptions, allowing further optimizations regarding locking in the
future.
2025-07-08 14:16:20 +02:00
Alvar
a13751d972
Merge pull request #10481 from Icinga/docs-02-installation-icingadb-for-everyone
docs: Icinga DB Setup for every Distribution
2025-07-03 15:50:57 +00:00
Alvar Penning
950c8017df
docs: Icinga DB Setup for every Distribution
Within the GNU/Linux distribution specific installation guides, the "Set
up Icinga DB" section was only excluded for openSUSE. However, since
there is an openSUSE installation guide within Icinga DB[^0], this is
not consistent. Thus, the if-guard was removed, resulting in this
section being available for each distribution. Windows is already
excluded through an if-guard above.

Some cases for Fedora were missing, which were also added.

[^0]: https://icinga.com/docs/icinga-db/latest/doc/02-Installation/openSUSE/
2025-07-03 15:42:34 +02:00
Julian Brost
c2ca7d1cfc
Merge pull request #10493 from martialblog/docs/elastic
Mention Elasticsearch prefix for indices and various minor fixes
2025-07-02 10:30:49 +02:00
Julian Brost
464bf7eab4
Merge pull request #10486 from cjsoftuk/10485-checkable-expiry-time
Fix expiry times not applying correctly to Acknowledgements
2025-07-02 10:25:42 +02:00
Markus Opolka
b7deb5099a Update AUTHORS 2025-06-30 16:55:18 +02:00
Markus Opolka
3a031a1f55 docs: Fix various misspellings 2025-06-30 16:50:34 +02:00
Markus Opolka
730a51ccb0 docs: Mention Elasticsearch prefix for indices 2025-06-30 16:21:31 +02:00
Chris Malton
035f130901 Update AUTHORS 2025-06-23 11:58:05 +02:00
Chris Malton
ec48dae331 Correct a problem with expiry times not being passed through to AcknowledgeProblem 2025-06-23 11:57:29 +02:00
Julian Brost
d861cd59d2
Merge pull request #10482 from Icinga/release-checklist-upgrading-docs
Add a hint for upgrading docs to the release checklist
2025-06-18 13:41:10 +02:00
Julian Brost
3cdc115863
Merge pull request #10483 from Icinga/upgrading-docs-v2.15.0
Add upgrading docs for v2.15.0
2025-06-18 12:28:59 +02:00
Julian Brost
e105eefee7 Add upgrading docs for v2.15.0 2025-06-18 11:51:34 +02:00
Julian Brost
2b8fbe5d92 Add a hint for upgrading docs to the release checklist 2025-06-18 11:29:51 +02:00
Julian Brost
f87948081f
Merge pull request #10471 from Icinga/release-215
Release v2.15.0
v2.15.0
2025-06-17 14:18:50 +02:00