14389 Commits

Author SHA1 Message Date
Julian Brost
bc7debed4f
Merge pull request #10558 from Icinga/fix-posix-error-double-free
Fix double-free error in posix_error::what()
2025-09-23 16:14:45 +02:00
Julian Brost
3674af75de
Merge pull request #10553 from Icinga/jsonrpc-utilization-metrics
Add JSON-RPC utilization metrics and troubleshooting documentation
2025-09-23 16:05:44 +02:00
Julian Brost
2a7fb13865 Docs: add some troubleshooting for overloaded JSON-RPC connections 2025-09-23 11:05:08 +02:00
Julian Brost
be2b1a878e Endpoint expose seconds_processing_messages attribute
Co-authored-by: Alexander A. Klimov <alexander.klimov@icinga.com>
2025-09-23 11:05:08 +02:00
Julian Brost
e3ee07b5a0 Measure and store message processing time per endpoint
Co-authored-by: Alexander A. Klimov <alexander.klimov@icinga.com>
2025-09-23 11:05:08 +02:00
Alexander A. Klimov
4b2b45c8a1 Introduce AtomicDuration 2025-09-23 11:04:58 +02:00
Yonas Habteab
c2c9b6b159
Merge pull request #10561 from Icinga/cert-fixture-no-symlinks
Rename/Move certificates in unit test fixture instead of symlinking
2025-09-19 12:21:16 +02:00
Johannes Schmidt
db4e984989 Fix double-free error in posix_error::what() 2025-09-17 10:11:37 +02:00
Johannes Schmidt
9469478d7c Rename/Move existing certs/ca instead of symlinking 2025-09-16 13:35:18 +02:00
Julian Brost
2063d2bdbc
Merge pull request #10505 from Icinga/docker-v2
Rework docker images build
2025-09-15 12:52:29 +02:00
Julian Brost
9f980bde70
Merge pull request #10556 from Icinga/ubuntu-24.10-eol
GitHub Actions: remove Ubuntu 24.10 (end of life)
2025-09-15 11:44:52 +02:00
Julian Brost
4897ea908a
Merge pull request #10550 from Icinga/fix-long-running-tests
Fix annoying long-running tests
2025-09-15 11:43:44 +02:00
Julian Brost
9e5882ea04 GitHub Actions: remove Ubuntu 24.10 (end of life)
That version went out of support in July 2025 [1] and by now the repos got
archived and causes pipelines to fail [2]:

   Err:5 http://security.ubuntu.com/ubuntu oracular-security Release
     404  Not Found [IP: 185.125.190.83 80]
   Err:6 http://archive.ubuntu.com/ubuntu oracular Release
     404  Not Found [IP: 185.125.190.36 80]
   Err:7 http://archive.ubuntu.com/ubuntu oracular-updates Release
     404  Not Found [IP: 185.125.190.36 80]
   Err:8 http://archive.ubuntu.com/ubuntu oracular-backports Release
     404  Not Found [IP: 185.125.190.36 80]

[1]: https://ubuntu.com/about/release-cycle
[2]: https://github.com/Icinga/icinga2/actions/runs/17671678861/job/50224642536#step:5:25
2025-09-15 09:03:42 +02:00
Yonas Habteab
5f862ce3bb HttpServerConnection: use std::chrono for m_Seen 2025-09-12 13:40:36 +02:00
Yonas Habteab
a2b44c0fbb tests: speed up timer tests using smaller sleep times 2025-09-12 12:54:18 +02:00
Yonas Habteab
97ad0fc552 Make HTTP livness timout configurable for unittests
It's annoying to have to wait 10 seconds for the `liveness_disconnect`
test to complete, so make the timeout configurable and set it to a way
lower value to test the functionality.
2025-09-12 12:54:18 +02:00
Julian Brost
cfbad92d9b
Merge pull request #10528 from Icinga/cmake-discover-boost-tests
Automatically discover unit-tests and test fixture dependencies
2025-09-12 12:20:58 +02:00
Yonas Habteab
8ea11128a4 don't install boost dev in the final image 2025-09-10 15:15:00 +02:00
Johannes Schmidt
2461c2364f Drop ICINGA2_WITH_TESTS option in favor of CTest's BUILD_TESTING
There is no need to use our own option for this when an official
one exists. Even worse, on the current master, if we set ours to
on and the official one to OFF, the tests directory is included,
but the add_boost_test() command skips building/adding them, which
forces us to wrap additional calls to set_tests_properties() in
a check on the official option.
2025-09-10 13:48:28 +02:00
Johannes Schmidt
b4681b10ec Discover Boost test cases automatically after build
This adds a global fixture that can parse an additional argument to
the test executables (`--generate_ctest_config`). When run by
CMake during build, this generates a CTest script containing all
the tests and their properties.

An additional decorator, that defines CTest properties for a test case
or suite that will be added to the tests during config generation.

This version needs no hacks, no huge CMake scripts, just a bit of
additional C++ code that iterates over all test-cases and collects
the information CTest needs.

One caveat is still that this does not work with cross-compilation,
which probably isn't an issue to begin with, but there are also ways
to fix that if necessary.
2025-09-10 13:48:24 +02:00
Johannes Schmidt
38ea1bb39c Fix rediscovered test-cases in icinga-checkresult
Co-authored-by: Yonas Habteab <yonas.habteab@icinga.com>
2025-09-09 16:09:00 +02:00
Julian Brost
87df80d322
Merge pull request #10516 from Icinga/http-handlers-stream-refactor
Refactor HTTP connection handling and some handlers to stream responses
2025-08-29 11:33:34 +02:00
Yonas Habteab
3bf1e6e88a Bump base image version to Debian 13 (trixie)
It's going to be released tomorrow, so let's use the latest Debian release
as the base image while we are at it. Also run always `apt upgrade` to upgrade
any outdated packages (if any).
2025-08-28 16:09:47 +02:00
Yonas Habteab
28aec98aa1 workflows: drop docker.yml 2025-08-28 16:09:47 +02:00
Yonas Habteab
5ffdb7d746 workflows: build and publish container images 2025-08-28 16:09:47 +02:00
Yonas Habteab
bdfdc7e7dc docs: Add For-Container.md 2025-08-28 16:09:47 +02:00
Yonas Habteab
5e074e3de8 Add Containerfile
Previously, the https://github.com/Icinga/docker-icinga2 repository was
used to build the Docker images for Icinga 2. However, due to its
various design flaws, the resulted images had limited usability and
required a lot of manual tweaking to make something useful out of them.
This commit now follows our new principles of building Docker images
from the Icinga DB repository, and replaces the old separate repository
with this one. It makes use of the newest Docker BuildKit features to
build the images in a more efficient way, while also granting users full
flexibility to easily extend or modify the images as they see fit
without any issues.
2025-08-28 16:09:46 +02:00
Johannes Schmidt
7373f36cc5 Add unit-tests for HttpServerConnection and HTTP message classes 2025-08-28 13:22:18 +02:00
Johannes Schmidt
4782ea8a75 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-08-28 13:22:18 +02:00
Johannes Schmidt
bb75d73012 Refactor ObjectQueryHandler to use new JSON stream encoder 2025-08-28 13:22:18 +02:00
Johannes Schmidt
62b2dadbac 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-08-28 13:22:18 +02:00
Johannes Schmidt
d32f04a863 Refactor EventsHandler to stream responses via chunked encoding 2025-08-28 13:22:18 +02:00
Johannes Schmidt
3832bb4296 Use new HTTP message classes in HttpServerConnection and Handlers 2025-08-28 13:22:18 +02:00
Johannes Schmidt
37df843700 Add HttpRequest and HttpResponse classes 2025-08-28 13:22:15 +02:00
Julian Brost
0c2fd00383
Merge pull request #10538 from Icinga/allow-uid-gid-icinga-user-and-group
Allow UID/GID in ICINGA2_(USER|GROUP) environment variables
2025-08-27 11:00:50 +02:00
Johannes Schmidt
3ebe95ba8c Allow UID/GID in ICINGA2_(USER|GROUP) environment variables 2025-08-25 14:31:19 +02:00
Alexander Aleksandrovič Klimov
9905e9af32
Merge pull request #10389 from Icinga/zone-endpoint-order
Zone#GetEndpoints(): return endpoints in the specified order, not randomly🎲
2025-08-22 10:11:51 +02:00
Alexander Aleksandrovič Klimov
5f2ee6e119
Merge pull request #10393 from Icinga/zone-endpoint-log
ApiListener#RelayMessageOne(): log🪵 to which Endpoint messages are relayed
2025-08-22 10:11:25 +02:00
Lorenz Kästle
a218ba8d92
Remove clear variable from disk CheckCommand
This commit removes the -C parameter from the disk CheckCommand
since there is no possible way to use it in any functional capacity.

-C (or --clear) would reset the thresholds given previously
to allow for setting different thresholds for following filesystmes.
As an example:

check_disk -w 50% -c 5% -p / -C -w 1%  -p /home

would only set the warning threshold for /home.

Since there is no way to use it reasonably with the Icinga 2
implementation of check_disk (since thresholds can only be
given once and the order is undefined), the clear flag
has no worth here.

My suggestion is to remove it avoid suggesting that it might
be used, but I left it as a comment in the ITL to prevent
the next person from "adding a missing parameter".
2025-08-19 10:58:48 +00:00
Alvar
d1582766ec
Merge pull request #10526 from Tqnsls/patch-1
add "--long-output" to ssl_cert command
2025-08-18 12:47:18 +00:00
Silas
124d191afa
add "--long-output" to ssl_cert command
Co-Authored-By: Julian Brost <julian.brost@icinga.com>
2025-08-18 12:06:40 +02:00
Alexander A. Klimov
17b49bd5b6 ApiListener#RelayMessageOne(): log to which Endpoint messages are relayed
if they're for our parent Zone.
2025-08-15 11:03:55 +02:00
Alexander Aleksandrovič Klimov
20d9af0d32
Merge pull request #10536 from Icinga/Al2Klimov-patch-3
GHA: add Debian 13
2025-08-15 10:39:33 +02:00
Alexander Aleksandrovič Klimov
0ecbfa93dd
Merge pull request #10537 from Icinga/Boost1.89
Bump Boost shipped for Windows to v1.89
2025-08-15 10:06:00 +02:00
Alexander A. Klimov
5a83f153b7 Bump Boost shipped for Windows to v1.89 2025-08-14 11:06:37 +02:00
Alexander A. Klimov
76fa0d9e80 Boost: don't require "system" component
It's vanished in v1.89.
2025-08-14 11:06:37 +02:00
Alexander Aleksandrovič Klimov
00295cb64b
GHA: add Debian 13 2025-08-13 12:19:16 +02:00
Alexander Aleksandrovič Klimov
26c526b3dd
Merge pull request #10534 from Icinga/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-12 19:51:32 +02:00
dependabot[bot]
fdb471a09b
Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [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/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 15:18:20 +00:00
Yonas Habteab
1f92ec656b
Merge pull request #10523 from Icinga/dependency-eval-complexity
Prevent worst-case exponential complexity in dependency evaluation
2025-08-05 11:57:47 +02:00