Skip to content

ClusterEvents: Sync & process notification notified_problem_users#10380

Merged
yhabteab merged 1 commit intomasterfrom
sync-notified-problem-users-correctly
Mar 18, 2025
Merged

ClusterEvents: Sync & process notification notified_problem_users#10380
yhabteab merged 1 commit intomasterfrom
sync-notified-problem-users-correctly

Conversation

@yhabteab
Copy link
Copy Markdown
Member

fixes #9813

After

I've used the exact config given in #9813.

OK -> Critical:

[2025-03-14 12:27:01 +0100] information/Checkable: Checkable 'test!missing-recovery' has 1 notification(s). Checking filters for type 'Problem', sends will be logged.
[2025-03-14 12:27:01 +0100] information/Notification: Sending 'Problem' notification 'test!missing-recovery!missing-recovery' for user 'u2'
[2025-03-14 12:27:01 +0100] information/Notification: Sending 'Problem' notification 'test!missing-recovery!missing-recovery' for user 'u1'
[2025-03-14 12:27:01 +0100] information/Notification: Completed sending 'Problem' notification 'test!missing-recovery!missing-recovery' for checkable 'test!missing-recovery' and user 'u2' using command 'send'.
[2025-03-14 12:27:01 +0100] information/Notification: Completed sending 'Problem' notification 'test!missing-recovery!missing-recovery' for checkable 'test!missing-recovery' and user 'u1' using command 'send'.
$ curl -ksSu root:icinga 'https://config-master:5665/v1/objects/notifications/test!missing-recovery!missing-recovery?pretty=1' | jq '.results[].attrs.notified_problem_users'
[
  "u2",
  "u1"
]

$ curl -ksSu root:icinga 'https://master2:5667/v1/objects/notifications/test!missing-recovery!missing-recovery?pretty=1' | jq '.results[].attrs.notified_problem_users'
[
  "u2",
  "u1"
]

Critical -> Warning:

[2025-03-14 12:28:54 +0100] information/Checkable: Checkable 'test!missing-recovery' has 1 notification(s). Checking filters for type 'Problem', sends will be logged.
[2025-03-14 12:28:54 +0100] information/Notification: Sending 'Problem' notification 'test!missing-recovery!missing-recovery' for user 'u1'
[2025-03-14 12:28:54 +0100] information/Notification: Completed sending 'Problem' notification 'test!missing-recovery!missing-recovery' for checkable 'test!missing-recovery' and user 'u1' using command 'send'.
$ curl -ksSu root:icinga 'https://master2:5667/v1/objects/notifications/test!missing-recovery!missing-recovery?pretty=1' | jq '.results[].attrs.notified_problem_users'
[
  "u2",
  "u1"
]
$ curl -ksSu root:icinga 'https://config-master:5665/v1/objects/notifications/test!missing-recovery!missing-recovery?pretty=1' | jq '.results[].attrs.notified_problem_users'
[
  "u2",
  "u1"
]

@yhabteab yhabteab added bug Something isn't working area/distributed Distributed monitoring (master, satellites, clients) area/notifications Notification events labels Mar 14, 2025
@yhabteab yhabteab added this to the 2.15.0 milestone Mar 14, 2025
@cla-bot cla-bot bot added the cla/signed label Mar 14, 2025
Copy link
Copy Markdown
Member

@Al2Klimov Al2Klimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens

  • as long as the user has updated just one HA node to 2.15, yet?
  • in multi-level clusters with different versions?

@yhabteab yhabteab force-pushed the sync-notified-problem-users-correctly branch from 854a348 to 66cc6a4 Compare March 14, 2025 13:34
Copy link
Copy Markdown
Member

@Al2Klimov Al2Klimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better!

@yhabteab yhabteab merged commit 5e902fe into master Mar 18, 2025
25 checks passed
@yhabteab yhabteab deleted the sync-notified-problem-users-correctly branch March 18, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/distributed Distributed monitoring (master, satellites, clients) area/notifications Notification events bug Something isn't working cla/signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong value used while syncing Notification.notified_problem_users in the cluster (may result in missing recovery notifications)

2 participants