mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
StatusDataWriter: Fix wrong host notification filters
fixes #8387 refs #8192
This commit is contained in:
parent
ea2ac81003
commit
9302a6d03c
@ -544,6 +544,11 @@ String CompatUtility::GetCheckableNotificationNotificationPeriod(const Checkable
|
|||||||
|
|
||||||
String CompatUtility::GetCheckableNotificationNotificationOptions(const Checkable::Ptr& checkable)
|
String CompatUtility::GetCheckableNotificationNotificationOptions(const Checkable::Ptr& checkable)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Host::Ptr host;
|
||||||
|
Service::Ptr service;
|
||||||
|
tie(host, service) = GetHostService(checkable);
|
||||||
|
|
||||||
unsigned long notification_type_filter = 0;
|
unsigned long notification_type_filter = 0;
|
||||||
unsigned long notification_state_filter = 0;
|
unsigned long notification_state_filter = 0;
|
||||||
|
|
||||||
@ -555,6 +560,7 @@ String CompatUtility::GetCheckableNotificationNotificationOptions(const Checkabl
|
|||||||
std::vector<String> notification_options;
|
std::vector<String> notification_options;
|
||||||
|
|
||||||
/* notification state filters */
|
/* notification state filters */
|
||||||
|
if (service) {
|
||||||
if (notification_state_filter & (1<<ServiceWarning)) {
|
if (notification_state_filter & (1<<ServiceWarning)) {
|
||||||
notification_options.push_back("w");
|
notification_options.push_back("w");
|
||||||
}
|
}
|
||||||
@ -564,6 +570,11 @@ String CompatUtility::GetCheckableNotificationNotificationOptions(const Checkabl
|
|||||||
if (notification_state_filter & (1<<ServiceCritical)) {
|
if (notification_state_filter & (1<<ServiceCritical)) {
|
||||||
notification_options.push_back("c");
|
notification_options.push_back("c");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (notification_state_filter & (1<<HostDown)) {
|
||||||
|
notification_options.push_back("d");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* notification type filters */
|
/* notification type filters */
|
||||||
if (notification_type_filter & (1<<NotificationRecovery)) {
|
if (notification_type_filter & (1<<NotificationRecovery)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user