13822 Commits

Author SHA1 Message Date
Alexander A. Klimov
c23bd4c186 Test Timeout 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
ff5ae18b9c Timeout: use a plain callback, not an unnecessary coroutine 2025-01-13 10:42:36 +01:00
Alexander A. Klimov
f839707c4a Timeout#Timeout(): don't pass yield_context to callback
It's not used. Also, the callback shall run completely at once. This ensures that it won't (continue to) run once another coroutine on the strand calls Timeout#Cancel().
2025-01-13 10:42:36 +01:00
Yonas Habteab
a88d6988b4 JsonRpcConnection: Log message processing time stats
Co-Authored-By: Julian Brost <julian.brost@icinga.com>
2025-01-13 10:39:23 +01:00
Yonas Habteab
7225d78047 HttpServerConnection: Log noticable CPU semaphore wait time 2025-01-13 10:39:23 +01:00
Yonas Habteab
7b30cb3431 Don't endlessly wait on writer coroutine on disconnect 2025-01-13 10:36:21 +01:00
Yonas Habteab
f2fbb61ad8 Log before & after an RPC client is disconnected 2025-01-13 10:36:21 +01:00
Yonas Habteab
7ed5c6a2c7 JsonRpcConnection: Don't drop client from cache prematurely
PR #7445 incorrectly assumed that a peer that had already disconnected
and never reconnected was due to the endpoint client being dropped after
a successful socket shutdown. However, the issue at that time was that
there was not a single timeout guards that could cancel the `async_shutdown`
call, petentially blocking indefinetely. Although removing the client from
cache early might have allowed the endpoint to reconnect, it did not
resolve the underlying problem. Now that we have a proper cancellation
timeout, we can wait until the currently used socket is fully closed
before dropping the client from our cache. When our socket termination
works reliably, the `ApiListener` reconnect timer should attempt to
reconnect this endpoint after the next tick. Additionally, we now have
logs both for before and after socket termination, which may help
identify if it is hanging somewhere in between.
2025-01-13 10:36:21 +01:00
Julian Brost
2fffb28ab0 Add comment for remaining uses of async_shutdown() why it's safe
The reason for introducing AsioTlsStream::GracefulDisconnect() was to handle
the TLS shutdown properly with a timeout since it involves a timeout. However,
the implementation of this timeout involves spwaning coroutines which are
redundant in some cases. This commit adds comments to the remaining calls of
async_shutdown() stating why calling it is safe in these places.
2025-01-13 10:33:11 +01:00
Julian Brost
f99d35ed91 HttpServerConnection: use AsioTlsStream::GracefulDisconnect()
This new helper function has proper timeout handling which was missing here.
2025-01-13 10:33:11 +01:00
Julian Brost
28776cb37c JsonRpcConnection: use AsioTlsStream::GracefulDisconnect()
This new helper functions allows deduplicating the timeout handling for
`async_shutdown()`.
2025-01-13 10:33:11 +01:00
Julian Brost
a593bdfa5f AsioTlsStream: add GracefulDisconnect() and ForceDisconnect()
Calling `AsioTlsStream::async_shutdown()` performs a TLS shutdown which
exchanges messages (that's why it takes a `yield_context`) and thus has the
potential to block the coroutine. Therefore, it should be protected with a
timeout. As `async_shutdown()` doesn't simply take a timeout, this has to be
implemented using a timer. So far, these timers are scattered throughout the
codebase with some places missing them entirely. This commit adds helper
functions to properly shutdown a TLS connection with a single function call.
2025-01-13 10:33:11 +01:00
Julian Brost
156ba265e1 Simplify DependencyGraph:RemoveDependency() method 2025-01-13 10:25:48 +01:00
Yonas Habteab
7501525550 ApiListener: Sync runtime configs in order 2025-01-13 10:25:48 +01:00
Yonas Habteab
5c0ce6350c DependencyGraph: Allow lookups by parent & child dependencies 2025-01-13 10:25:48 +01:00
Alexander A. Klimov
c64ff492ec DependencyGraph: use ConfigObject*, not Object*
This saves dynamic_cast<ConfigObject*> + if() on every item of GetChildren().
2025-01-13 10:25:42 +01:00
Alexander A. Klimov
6aa2355427 DependencyGraph: switch "parent" and "child" terminology
The .ti files call `DependencyGraph::AddDependency(this, service.get())`. Obviously, `service.get()` is the parent and `this` (Downtime, Notification, ...) is the child. The DependencyGraph terminology should reflect this not to confuse its future users.
2025-01-13 10:23:28 +01:00
Julian Brost
c3b5dbfbc7
Merge pull request #10289 from Icinga/fix-broken-links-2.14
Fix and cleanup broken and obsolete links
2025-01-13 09:27:06 +01:00
Julian Brost
bea0d34f35
Merge pull request #10285 from Icinga/gha2144
Update GitHub Actions
2025-01-13 09:26:17 +01:00
Blerim Sheqa
54fa56c010 Fix and cleanup broken and obsolete links 2025-01-10 14:35:57 +01:00
Alexander A. Klimov
2e8258dfe7 GHA: also test SLES, not just openSUSE
They may be similar, but SLES isn't that hard to deploy.
2025-01-08 12:15:19 +01:00
Alexander A. Klimov
bba2e1a84e GHA: drop EOL SUSE 15.4 2025-01-08 12:15:18 +01:00
Alexander A. Klimov
07aec81054 GHA: drop EOL SLES 15.3 2025-01-08 12:15:18 +01:00
Alexander A. Klimov
5b90b85c81 GHA: drop EOL SLES 12.5 2025-01-08 12:15:17 +01:00
Alexander A. Klimov
4e52179136 GHA: Amazon Linux: fix broken link to Boost tarball 2025-01-08 12:15:14 +01:00
Yonas Habteab
7346b70201
Merge pull request #10081 from Icinga/doc2143
Update documentation
2025-01-08 09:56:18 +01:00
Alexander A. Klimov
e2361d014f Doc: Distributed Monitoring: add section "External CA/PKI"
The following already works:

* Custom key sizes, e.g. 2048 bits
* Custom key types, e.g. ECC
* Multiple trusted root CAs in `/var/lib/icinga2/certs/ca.crt`
* Different root CAs per cluster subtree, as long as each node trusts the
  issuers of the certificates of all nodes it's directly connected to
* Any number of intermediate CAs
2024-12-02 10:15:07 +01:00
Christian Lauf
c966f18f96 Enhance documentation regarding internal icinga config sync check (#10101)
* Update 10-icinga-template-library.md

Explicitly name the config-sync check feature of the icinga check, as before this was a little bit too undocumented making it unknown to me.
Also mention where the check has to executed in order to bring the desired results.

* Update 15-troubleshooting.md

Add 4h typical error point for configuration stored outside of /etc/icinga2/zones.d. For when a non-distributed setup was migrated to a distributed setup.
Also link to the internal icinga CheckCommand to promote its existance.

* Update 15-troubleshooting.md

Remove "-" from link

* Revert "Update 15-troubleshooting.md"

This reverts commit bb25ba3ff5d2797b95cc6c6d5d4fc64e342164f1.

* Update AUTHORS

Add myself to AUTHORS

* Update doc/15-troubleshooting.md

Co-authored-by: alvar <8402811+oxzi@users.noreply.github.com>

* Update doc/10-icinga-template-library.md

Co-authored-by: alvar <8402811+oxzi@users.noreply.github.com>

* Update doc/15-troubleshooting.md

Co-authored-by: alvar <8402811+oxzi@users.noreply.github.com>

---------

Co-authored-by: alvar <8402811+oxzi@users.noreply.github.com>
2024-12-02 10:13:54 +01:00
Alexander Aleksandrovič Klimov
840415590e openSUSE install docs: remove false info
No packages to be installed according to these instructions require the given repo.
2024-12-02 10:13:54 +01:00
Alexander A. Klimov
60a7152ef9 Document how to enable/disable Debug Output on the fly
This is a good alternative to `icinga2 feature enable debuglog`:

* Object creation/deletion via API happens immediately and requires no restart
* Hence, the debug log is enabled exactly as long as desired

Co-authored-by: alvar <8402811+oxzi@users.noreply.github.com>
2024-12-02 10:13:54 +01:00
Alexander A. Klimov
3b40ba1fe4 doc/: fix "a HA" -> "an HA" 2024-12-02 10:13:54 +01:00
Yonas Habteab
a3fcd5bbef docs: Add missing space 2024-12-02 10:13:54 +01:00
Yonas Habteab
ac220ba651 docs: Add $ to the escape sequences section
feat: Add the `$` character to the escape sequences table.
2024-12-02 10:13:54 +01:00
Alexander A. Klimov
b43e5e1620 doc/: don't mention CentOS
It's EOL.
2024-12-02 10:13:54 +01:00
Alexander Aleksandrovič Klimov
c63d679693 Linux Dev Environment: fix /usr/local/icinga2/etc ownership
We instruct the users to build as root and chown just /usr/local/icinga2/var, but at least `icinga2 api setup` also needs to modify /usr/local/icinga2/etc.
2024-12-02 10:13:54 +01:00
Josef Friedrich
90e1addd96 Fix typo in the api documentation 2024-12-02 10:13:54 +01:00
Josef Friedrich
caa22c6703 Remove trailing whitespaces in the markdown files of the documentation 2024-12-02 10:13:54 +01:00
Alexander A. Klimov
cb75435891 .deb: let user install icinga-archive-keyring package 2024-12-02 10:13:54 +01:00
Alexander A. Klimov
b498c94706 doc/02-installation.md: remove Raspbian which is not supported anymore 2024-12-02 10:13:54 +01:00
Alexander Aleksandrovič Klimov
8860f69623 doc/02-installation.md: remove outdated info
The Backports Repository is required for Debian 9, but we don't build even v10 anymore.
2024-12-02 10:13:54 +01:00
Alexander Aleksandrovič Klimov
39fbe560de doc/21-development.md: fix bad link address 2024-12-02 10:13:54 +01:00
Alexander Aleksandrovič Klimov
52f4dbecc1 doc/03-monitoring-basics.md: fix invalid link address 2024-12-02 10:13:54 +01:00
Bernd Arnold
1461fc9ea1 Docs: Add missing angle bracket 2024-12-02 10:13:54 +01:00
Yonas Habteab
e3626347bb Add missing Object{created,deleted,modified} docs 2024-12-02 10:13:54 +01:00
Alexander A. Klimov
ff4c6a6841 Don't rpm --import https://packages.icinga.com/icinga.key
just like on packages.icinga.com and for the same security reasons we don't
use apt-key add anymore for: https://blog.cloudflare.com/dont-use-apt-key

Our repos already reference https://packages.icinga.com/icinga.key
and both RPM distro families properly handle that.
2024-12-02 10:13:54 +01:00
Yonas Habteab
1d46a1e824 docs: Drop last_in_downtime attrs 2024-12-02 10:13:54 +01:00
Alvar Penning
36d892e840 Document root user usage in installation
The installation documentation currently implies that all commands are
being prompted by the root user or an user with root-like privileges.
This is now explicitly stated and, additionally, another if-guard was
added to not include the "Add Icinga Package Repository" section for
Windows, as it does not fit there.

Closes #9959.
2024-12-02 10:13:54 +01:00
Pavel Motyrev
9101c11661 Update AUTHORS 2024-12-02 10:13:54 +01:00
Pavel Motyrev
86eeee64e7 Update 06-distributed-monitoring.md
fix typo
2024-12-02 10:13:54 +01:00
Alexander A. Klimov
ca035e6b13 AUTHORS: add Nicolas Berens <nicolas.berens@planet.com> 2024-12-02 10:13:54 +01:00