Commit Graph

77 Commits

Author SHA1 Message Date
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 3e73a262cc Sync comment and downtime removal info for Icinga DB history
When a comment or downtime is removed manually, the name of the requestor and
timestamp have to be synced to other nodes in the cluster to allow all of them
to generate a consistent Icinga DB history stream.

refs #9101
2022-01-05 10:27:13 +01:00
Julian Brost 8f585bd2ee event::ExecuteCommand: add missing origin check
Only handle messages with a trusted origin in
ClusterEvents::ExecuteCommandAPIHandler. Previously, it would not locally
execute any command but forward them to other nodes where they would then have
a trusted origin and be executed.
2021-06-29 11:15:22 +02:00
Julian Brost 29727e06c0 Only handle event::SetSuppressed{Notifications,NotificationTypes} within the local zone
Note that even when passing `nullptr` as target zone to `RelayMessage()`, the
cluster message will still be sent to the parent zone. These incoming messages
will now be rejected by the parent nodes. At the moment, there's no way to only
send within the local zone.
2021-03-17 15:05:12 +01:00
Alexander A. Klimov 0ad1ab20aa Fix code style
refs #8034
2020-11-23 16:39:24 +01:00
Alexander A. Klimov bb851b0558 Merge branch 'master' into feature/v1-actions-execute-command-8034 2020-10-28 18:37:08 +01:00
Alexander A. Klimov 40ac05c182 Introduce Endpoint#capabilities
refs #8034
2020-10-19 13:04:20 +02:00
Mattia Codato df2b82f7fe Remove an useless check 2020-08-05 16:14:57 +02:00
Mattia Codato 7474ab6de5 Set exit code 126 if endpoint doens't support the new executeCommand API 2020-08-05 15:53:34 +02:00
Mattia Codato 7c004af6be Check child endpoint versions and check child zone can access to the target endpoint 2020-08-05 14:08:54 +02:00
Mattia Codato ac71cc67f8 Use local zone for update executions 2020-08-04 16:09:21 +02:00
Mattia Codato 951388797a Forward the execute command through the zones 2020-08-03 21:09:57 +02:00
Eric Lippmann e8745f7e96
Merge pull request #7816 from Icinga/feature/notification-timeperiod-6167
Re-send notifications previously suppressed by their time periods
2020-08-03 10:04:27 +02:00
Mattia Codato cf1430c409 Fix update execution 2020-07-31 14:07:48 +02:00
Alexander A. Klimov c515822649 Re-send notifications previously suppressed by their time periods
refs #6167
2020-07-29 17:13:41 +02:00
Mattia Codato 064d5e9194 Keep consistency with other methods in case of missing API listener 2020-07-29 08:57:22 +02:00
Mattia Codato a834b5cecd Remove unused key in the execution 2020-07-29 08:46:09 +02:00
Mattia Codato 2cda17a99b Remove pending key when the execution is completed 2020-07-29 08:45:19 +02:00
Mattia Codato 5a4fa69650 Fix logs 2020-07-29 08:43:30 +02:00
Mattia Codato 1e59810ddd Fix indentation 2020-07-29 08:38:49 +02:00
Alexander A. Klimov 9dc297987e Sync Checkable#last_check_started
refs #7888
2020-07-28 11:54:13 +02:00
Mattia Codato 50f803c042 Return the process result parameters instead of the check result 2020-07-15 18:40:37 +02:00
Mattia Codato 6bad8bbc0f Replace executeactiontask with a lambda function 2020-07-13 09:47:19 +02:00
Mattia Codato fa4aebbfd2 Set CheckResult to execeution 2020-07-10 16:56:35 +02:00
Mattia Codato 39479b666f Implement ClusterEvents::ExecutedCommandAPIHandler 2020-07-10 11:21:13 +02:00
Mattia Codato 33926ba983 Check if executions are not null 2020-07-06 16:21:05 +02:00
Mattia Codato 6a5deaf7d4 Fix update executions. Fix code indentation 2020-07-03 16:36:58 +02:00
Mattia Codato 50693d7ea9 Add newline at the end of file 2020-06-26 16:36:57 +02:00
Mattia Codato 35bb329a59 Implement ClusterEvents::UpdateExecutionsAPIHandler 2020-06-26 12:33:44 +02:00
Alexander A. Klimov 9cb3779ec2 Add stub for event::UpdateExecutions
refs #8034
2020-06-02 17:16:30 +02:00
Alexander A. Klimov fc220bac69 Add stub for event::ExecutedCommand
refs #8034
2020-06-02 13:44:15 +02:00
Michael Friedrich d242b41704 Revert "Make NotificationResult available for events: Cluster and Features"
This reverts commit 566e59bbfa.
2020-01-07 14:20:59 +01:00
Alexander A. Klimov 829d07aefe Introduce Checkable#acknowledgement_last_change
refs #7689
2019-12-10 10:44:23 +01:00
Alexander A. Klimov 798ea54173 Refuse acking an already acked checkable 2019-12-05 11:08:16 +01:00
Alexander A. Klimov ea5403a55c Extend Checkable::OnAcknowledgementCleared by removedBy 2019-12-03 17:00:54 +01:00
Alexander A. Klimov ed56fa34dc Re-send suppressed notifications
refs #5919
2019-07-09 16:38:50 +02:00
Michael Friedrich 566e59bbfa Make NotificationResult available for events: Cluster and Features 2019-03-28 11:42:28 +01:00
Michael Friedrich d14a88235d Replace Copyright header with a short version, part I
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich 9f2ccfbaa0 ClusterEvents::AcknowledgementSet event should forward 'persistent' attribute 2019-01-28 17:29:46 +01:00
Michael Friedrich dab53448bc icinga.com: Update *.{h,c}pp 2018-10-18 09:27:04 +02:00
Noah Hilverling 948333225d Fix nullptr deref in cluster events 2018-02-21 13:47:46 +01:00
Noah Hilverling e28277175b Implement concurrent checks limit for remote checks
fixes #4841
2018-01-29 14:50:14 +01:00
Gunnar Beutner c2fb9fe226 Use initializer lists for arrays and dictionaries 2018-01-16 12:27:44 +01:00
Gunnar Beutner ac155d1dda Apply clang-tidy fix 'modernize-redundant-void-arg' 2018-01-04 12:24:57 +01:00
Michael Insel 158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Jean Flach 2636e6a77a Whitespace fix
What does this change?
* Remove use of spaces for formatting
These could be found by using `grep -r -l -P '^\t+ +[^*]'
* Removal of training whitespaces
* A few lines longer than 120 chars
2017-12-20 14:53:52 +01:00
Gunnar Beutner 325e4a2fb9 Use nullptr instead of <Type>::Ptr() 2017-11-30 17:47:09 +01:00
Michael Friedrich 68cae91378 Remove bottom-up cluster messages
refs #4799
2017-09-22 14:04:53 +02:00
Michael Friedrich 79dcb789c2 Move PerfdataValue() class into base library
This is required for libremote and ApiListener stats in #5133
2017-05-15 16:32:29 +02:00
Michael Friedrich 0f1aa23575 Add target object in cluster error messages to debug log
fixes #4288
2017-05-11 16:10:40 +02:00