mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-21 16:57:58 +02:00
Merge pull request #8775 from Icinga/bugfix/problem-notification-at-downtime-end-2.12
Send problem notifications after downtime end for checkables in child zones (2.12)
This commit is contained in:
commit
8f0b7910b9
@ -1431,7 +1431,7 @@ Message updates will be dropped when:
|
|||||||
* Checkable does not exist.
|
* Checkable does not exist.
|
||||||
* Origin endpoint's zone is not allowed to access this checkable.
|
* Origin endpoint's zone is not allowed to access this checkable.
|
||||||
|
|
||||||
#### event::SuppressedNotifications <a id="technical-concepts-json-rpc-messages-event-setsupressednotifications"></a>
|
#### event::SetSuppressedNotifications <a id="technical-concepts-json-rpc-messages-event-setsupressednotifications"></a>
|
||||||
|
|
||||||
> Location: `clusterevents.cpp`
|
> Location: `clusterevents.cpp`
|
||||||
|
|
||||||
@ -1440,7 +1440,7 @@ Message updates will be dropped when:
|
|||||||
Key | Value
|
Key | Value
|
||||||
----------|---------
|
----------|---------
|
||||||
jsonrpc | 2.0
|
jsonrpc | 2.0
|
||||||
method | event::SuppressedNotifications
|
method | event::SetSuppressedNotifications
|
||||||
params | Dictionary
|
params | Dictionary
|
||||||
|
|
||||||
##### Params
|
##### Params
|
||||||
@ -1456,6 +1456,8 @@ supressed\_notifications | Number | Bitmask for suppressed notifications.
|
|||||||
Event Sender: `Checkable::OnSuppressedNotificationsChanged`
|
Event Sender: `Checkable::OnSuppressedNotificationsChanged`
|
||||||
Event Receiver: `SuppressedNotificationsChangedAPIHandler`
|
Event Receiver: `SuppressedNotificationsChangedAPIHandler`
|
||||||
|
|
||||||
|
Used to sync the notification state of a host or service object within the same HA zone.
|
||||||
|
|
||||||
##### Permissions
|
##### Permissions
|
||||||
|
|
||||||
The receiver will not process messages from not configured endpoints.
|
The receiver will not process messages from not configured endpoints.
|
||||||
@ -1463,7 +1465,7 @@ The receiver will not process messages from not configured endpoints.
|
|||||||
Message updates will be dropped when:
|
Message updates will be dropped when:
|
||||||
|
|
||||||
* Checkable does not exist.
|
* Checkable does not exist.
|
||||||
* Origin endpoint's zone is not allowed to access this checkable.
|
* Origin endpoint is not within the local zone.
|
||||||
|
|
||||||
#### event::SetSuppressedNotificationTypes <a id="technical-concepts-json-rpc-messages-event-setsuppressednotificationtypes"></a>
|
#### event::SetSuppressedNotificationTypes <a id="technical-concepts-json-rpc-messages-event-setsuppressednotificationtypes"></a>
|
||||||
|
|
||||||
@ -1484,6 +1486,8 @@ Key | Type | Description
|
|||||||
notification | String | Notification name
|
notification | String | Notification name
|
||||||
supressed\_notifications | Number | Bitmask for suppressed notifications.
|
supressed\_notifications | Number | Bitmask for suppressed notifications.
|
||||||
|
|
||||||
|
Used to sync the state of a notification object within the same HA zone.
|
||||||
|
|
||||||
##### Functions
|
##### Functions
|
||||||
|
|
||||||
Event Sender: `Notification::OnSuppressedNotificationsChanged`
|
Event Sender: `Notification::OnSuppressedNotificationsChanged`
|
||||||
@ -1496,7 +1500,7 @@ The receiver will not process messages from not configured endpoints.
|
|||||||
Message updates will be dropped when:
|
Message updates will be dropped when:
|
||||||
|
|
||||||
* Notification does not exist.
|
* Notification does not exist.
|
||||||
* Origin endpoint's zone is not allowed to access this notification.
|
* Origin endpoint is not within the local zone.
|
||||||
|
|
||||||
|
|
||||||
#### event::SetNextNotification <a id="technical-concepts-json-rpc-messages-event-setnextnotification"></a>
|
#### event::SetNextNotification <a id="technical-concepts-json-rpc-messages-event-setnextnotification"></a>
|
||||||
@ -1702,6 +1706,9 @@ text | String | Notification text
|
|||||||
Event Sender: `Checkable::OnNotificationsRequested`
|
Event Sender: `Checkable::OnNotificationsRequested`
|
||||||
Event Receiver: `SendNotificationsAPIHandler`
|
Event Receiver: `SendNotificationsAPIHandler`
|
||||||
|
|
||||||
|
Signals that notifications have to be sent within the same HA zone. This is relevant if the checkable and its
|
||||||
|
notifications are active on different endpoints.
|
||||||
|
|
||||||
##### Permissions
|
##### Permissions
|
||||||
|
|
||||||
The receiver will not process messages from not configured endpoints.
|
The receiver will not process messages from not configured endpoints.
|
||||||
@ -1709,7 +1716,7 @@ The receiver will not process messages from not configured endpoints.
|
|||||||
Message updates will be dropped when:
|
Message updates will be dropped when:
|
||||||
|
|
||||||
* Checkable does not exist.
|
* Checkable does not exist.
|
||||||
* Origin endpoint's zone the same as the receiver. This binds notification messages to the HA zone.
|
* Origin endpoint is not within the local zone.
|
||||||
|
|
||||||
#### event::NotificationSentUser <a id="technical-concepts-json-rpc-messages-event-notificationsentuser"></a>
|
#### event::NotificationSentUser <a id="technical-concepts-json-rpc-messages-event-notificationsentuser"></a>
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ void ClusterEvents::SuppressedNotificationsChangedHandler(const Checkable::Ptr&
|
|||||||
message->Set("method", "event::SetSuppressedNotifications");
|
message->Set("method", "event::SetSuppressedNotifications");
|
||||||
message->Set("params", params);
|
message->Set("params", params);
|
||||||
|
|
||||||
listener->RelayMessage(origin, checkable, message, true);
|
listener->RelayMessage(origin, nullptr, message, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value ClusterEvents::SuppressedNotificationsChangedAPIHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params)
|
Value ClusterEvents::SuppressedNotificationsChangedAPIHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params)
|
||||||
@ -350,7 +350,7 @@ Value ClusterEvents::SuppressedNotificationsChangedAPIHandler(const MessageOrigi
|
|||||||
if (!checkable)
|
if (!checkable)
|
||||||
return Empty;
|
return Empty;
|
||||||
|
|
||||||
if (origin->FromZone && !origin->FromZone->CanAccessObject(checkable)) {
|
if (origin->FromZone && origin->FromZone != Zone::GetLocalZone()) {
|
||||||
Log(LogNotice, "ClusterEvents")
|
Log(LogNotice, "ClusterEvents")
|
||||||
<< "Discarding 'suppressed notifications changed' message for checkable '" << checkable->GetName()
|
<< "Discarding 'suppressed notifications changed' message for checkable '" << checkable->GetName()
|
||||||
<< "' from '" << origin->FromClient->GetIdentity() << "': Unauthorized access.";
|
<< "' from '" << origin->FromClient->GetIdentity() << "': Unauthorized access.";
|
||||||
@ -378,7 +378,7 @@ void ClusterEvents::SuppressedNotificationTypesChangedHandler(const Notification
|
|||||||
message->Set("method", "event::SetSuppressedNotificationTypes");
|
message->Set("method", "event::SetSuppressedNotificationTypes");
|
||||||
message->Set("params", params);
|
message->Set("params", params);
|
||||||
|
|
||||||
listener->RelayMessage(origin, notification, message, true);
|
listener->RelayMessage(origin, nullptr, message, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value ClusterEvents::SuppressedNotificationTypesChangedAPIHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params)
|
Value ClusterEvents::SuppressedNotificationTypesChangedAPIHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params)
|
||||||
@ -396,7 +396,7 @@ Value ClusterEvents::SuppressedNotificationTypesChangedAPIHandler(const MessageO
|
|||||||
if (!notification)
|
if (!notification)
|
||||||
return Empty;
|
return Empty;
|
||||||
|
|
||||||
if (origin->FromZone && !origin->FromZone->CanAccessObject(notification)) {
|
if (origin->FromZone && origin->FromZone != Zone::GetLocalZone()) {
|
||||||
Log(LogNotice, "ClusterEvents")
|
Log(LogNotice, "ClusterEvents")
|
||||||
<< "Discarding 'suppressed notification types changed' message for notification '" << notification->GetName()
|
<< "Discarding 'suppressed notification types changed' message for notification '" << notification->GetName()
|
||||||
<< "' from '" << origin->FromClient->GetIdentity() << "': Unauthorized access.";
|
<< "' from '" << origin->FromClient->GetIdentity() << "': Unauthorized access.";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user