Commit Graph

13009 Commits

Author SHA1 Message Date
Yonas Habteab 575af4c980 Defer: Allow to cancel the callback before going out of scope 2022-03-30 09:42:22 +02:00
Alexander Aleksandrovič Klimov d171301b9d
Merge pull request #9298 from Icinga/bugfix/icingadb-remove-comment-history
Icinga DB: discard comment removals with missing information
2022-03-29 11:25:01 +02:00
Alexander Aleksandrovič Klimov 0fe2a1eba0
Merge pull request #9236 from Icinga/Al2Klimov-patch-6
Drop Ubuntu hirsute
2022-03-29 10:57:02 +02:00
Alexander Aleksandrovič Klimov bbc2b59b0d
Merge pull request #9287 from Icinga/9275
Icinga DB: correct ack comments' is_sticky
2022-03-28 22:42:52 +02:00
Julian Brost d139bc31c8 Icinga DB: discard comment removals with missing information
If comments get removed in unintended ways (i.e. not by expiring or by using
the remove-comment API action), the comment object misses information to create
a proper history event for Icinga DB. Therefor, discard these events.
2022-03-28 16:58:05 +02:00
Alexander A. Klimov 1220ad8a2f Icinga DB: correct ack comments' is_sticky
On ack Icinga first adds a comment, then acks the checkable
so the ack event has the comment ID.

But due to the yet missing ack the comment was missing is_sticky.
That's corrected now.
2022-03-24 16:42:18 +01:00
Alexander A. Klimov 4399e82d9d Introduce Comment#sticky
Carries whether ack was sticky for ack comments.
2022-03-24 16:42:18 +01:00
Julian Brost 8c170855cc
Merge pull request #9292 from Icinga/probot/update-authors/master/a5846866ab7b6b06f4ec1f754a2ca46563618ad4
Update AUTHORS
2022-03-24 12:01:06 +01:00
Julian Brost 5857e646fd
Merge pull request #9199 from Icinga/Al2Klimov-patch-4
icinga2.service: depend on icingadb-redis.service if any
2022-03-23 17:19:35 +01:00
icinga-probot[bot] c5a26c9a89
Update AUTHORS 2022-03-23 15:55:35 +00:00
Julian Brost a5846866ab
Merge pull request #9289 from slalomsk8er/patch-1
Update 03-monitoring-basics.md
2022-03-23 16:55:23 +01:00
Julian Brost ba154d2a38
Merge pull request #7929 from Icinga/bugfix/override-default-template-apply-rules-7914
Apply rules: import default templates first
2022-03-23 11:30:51 +01:00
Julian Brost cfa6f1c6a9
Merge pull request #9288 from Icinga/9272
IcingaDB#SendRemovedComment(): ignore ack comments like #SendAddedComment()
2022-03-22 15:06:06 +01:00
Dominik Riva 34b8fe84d5
Update 03-monitoring-basics.md
Fix misleading statement:

```
  types = [ Acknowledgement, Recovery ]
```
right after a Notification config block will not help as this will only work on a `User` object.
2022-03-21 17:52:19 +01:00
Alexander A. Klimov 27966c3c08 IcingaDB#SendRemovedComment(): ignore ack comments like #SendAddedComment()
Icinga DB doesn't expect comment history for ack comments.

Before:

1. Acked checkable recovers
2. Icinga clears ack comments w/o setting removal time
3. Icinga DB gets neither removal time, nor expire time
4. Icinga DB falls back to NULL and violates NOT NULL constraint
2022-03-21 17:06:35 +01:00
Alexander Aleksandrovič Klimov fb2a58f177
Merge pull request #9284 from Icinga/bugfix/icingadb-array-locking
Add missing array locking in IcingaDB::GetArrayDeletedValues()
2022-03-09 19:26:57 +01:00
Julian Brost 9630e86997 Add missing array locking in IcingaDB::GetArrayDeletedValues()
icinga::Array requires locking by the caller when iterating using Begin() and
End(). This is only checked in debug builds but there it makes this function
fail.
2022-03-09 14:29:44 +01:00
Julian Brost bf5b905707
Merge pull request #9250 from Icinga/feature/fix-compiler-warning-do-not-move-local-variables
Fix compiler warnings don't move local variables
2022-03-08 11:37:09 +01:00
Julian Brost b4fd4c6131
Merge pull request #9207 from Icinga/bugfix/suppressed-state-notifications
Checkable: send state notifications after suppression if and only if the state differs compared to before the suppression started
2022-03-07 09:05:06 +01:00
Julian Brost 90848f602b Checkable: Add test for state notifications after a suppression ends 2022-03-03 14:25:23 +01:00
Julian Brost cbc0b21b86 Checkable: sync state_before_suppression in cluster
This ensures that in case of a failover in an HA zone, the other can take over
properly and has the required state to send the proper notifications.
2022-03-03 14:25:23 +01:00
Julian Brost 39cee3538a Checkable: improve state notifications after suppression ends
This commit changes the Checkable notification suppression logic (notifications
are currently suppressed on the Checkable if it is unreachable, in a downtime,
or acknowledged) to that after the suppression reason ends, a state
notification is sent if and only if the first hard state after is different
from the last hard state from before. If the checkable is in a soft state after
the suppression ends, the notification is further suppressed until a hard state
is reached.

To achieve this behavior, a new attribute state_before_suppression is added to
Checkable. This attribute is set to the last hard state the first time either a
PROBLEM or a RECOVERY notification is suppressed. Compared to from before,
neither of these two flags in the suppressed_notification will ever be cleared
while the supression is still ongoing but only after the suppression ended and
the current state is compared with the old state stored in
state_before_suppression.
2022-03-03 14:25:23 +01:00
Julian Brost 23a4640ccd
Merge pull request #9148 from Icinga/feature/icingadb-redis-lost-history-memory
Icinga DB: keep history in memory until written to Redis
2022-03-02 19:46:01 +01:00
Alexander A. Klimov 6b5106ffdd IcingaDB#Stop(): don't block shutdown, timeout instead 2022-03-02 16:39:44 +01:00
Alexander A. Klimov 3a8efcb4ea IcingaDB#Send*(): don't enqueue any history once stopped 2022-03-02 16:39:44 +01:00
Alexander A. Klimov cac22fe38b RedisConnection#Connect(): wait for all promises to be completed
by the read loop from the previous connection.
2022-03-02 16:39:44 +01:00
Alexander A. Klimov 9585a63fa0 Introduce IoEngine::YieldCurrentCoroutine() 2022-03-02 16:39:44 +01:00
Alexander A. Klimov 732d5c472d RedisConnection#ReadLoop(): don't crash (silently) if a promise to be set is already set 2022-03-02 16:39:37 +01:00
Alexander A. Klimov 50fee6aeb9 Icinga DB: include amount of history kept in memory in /v1/status 2022-03-02 16:39:37 +01:00
Alexander A. Klimov ad0fe764f7 Icinga DB: log amount of history kept in memory every 10s 2022-03-02 16:39:37 +01:00
Alexander A. Klimov 8ea62f7fc7 Icinga DB: keep history in memory until written to Redis
by putting the messages into a Bulker and retrying each chunk.
2022-03-02 16:39:37 +01:00
Alexander A. Klimov 9a8d388734 Introduce Bulker 2022-03-02 16:39:37 +01:00
Julian Brost ab70178bb3
Merge pull request #9266 from Icinga/feature/subscription
GHA: build RHEL and Amazon Linux
2022-03-02 09:09:07 +01:00
Alexander Aleksandrovič Klimov 3fee562e7a
Merge pull request #9256 from Icinga/bugfix/add-some-missing-locks
Add some missing locks to prevent data races
2022-03-01 16:12:50 +01:00
Alexander A. Klimov 3c75e09e99 GHA: preserve .rpm job names 2022-03-01 15:37:38 +01:00
Alexander A. Klimov b6d22345f2 GHA: build Amazon Linux 2022-03-01 13:13:38 +01:00
Alexander A. Klimov 799f451fc8 GHA: build RHEL 2022-03-01 13:13:38 +01:00
Alexander A. Klimov 8c0b118302 GHA: correct subscription packages repo 2022-03-01 13:13:38 +01:00
Alexander A. Klimov f6b194e9ae GHA: new subscription packages repo access token
with more permissions and URL-friendlier login name.
2022-03-01 13:13:38 +01:00
Alexander A. Klimov 9013ebf0fb GHA: explicitly specify whether $DISTRO packages require subscription
to have all info at one place in the file.
2022-02-28 16:36:16 +01:00
Julian Brost 9d3eba8383
Merge pull request #9259 from Icinga/bugfix/event-handler-spamming-8704
Checkable#ExecuteEventHandler(): don't outsource event command run twice
2022-02-25 16:51:31 +01:00
Yonas Habteab f00a3c9693 ConfigObject: Initialize local static var at declaration to ensure thread safety 2022-02-25 15:23:49 +01:00
Yonas Habteab fb21345bfd ConfigItem: Use atomic variables for notified and commited items count 2022-02-25 15:17:33 +01:00
Alexander A. Klimov 74935dad7b Checkable#ExecuteEventHandler(): don't outsource event command run twice
refs #8704
2022-02-24 14:03:57 +01:00
Yonas Habteab a0607aceff Fix compiler warnings don't move local variables 2022-02-22 17:51:43 +01:00
Alexander Aleksandrovič Klimov db321b9fcb
Merge pull request #9230 from Icinga/feature/installation-instructions
Update installation instructions for easier navigation on icinga.com
2022-02-21 16:38:42 +01:00
Alexander Aleksandrovič Klimov 9b35701526
Drop Ubuntu hirsute
It's EOL.
2022-02-21 13:20:38 +01:00
Alexander Aleksandrovič Klimov cf8923d628
Merge pull request #9016 from Napsty/nrpe-disable-logging
Add new check_nrpe parameter -D to disable logging to syslog
2022-02-21 12:19:56 +01:00
Julian Brost 5383df3c79
Merge pull request #9212 from Icinga/bugfix/multi-ido-notification-id
IDO: fix incorrect contacts in notification history with multiple IDO instances on a single node
2022-02-21 11:40:46 +01:00
Blerim Sheqa a759c1e451 Update installation instructions for easier navigation on icinga.com 2022-02-18 15:09:09 +01:00