From a4a0f9f5e6fbd2095f973ae85b597394f349d0f3 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 4 May 2017 14:38:00 +0200 Subject: [PATCH] Allow to filter notifications by notification_reason refs #2698 --- .../Monitoring/Backend/Ido/Query/HostnotificationQuery.php | 1 + .../library/Monitoring/Backend/Ido/Query/NotificationQuery.php | 1 + .../Monitoring/Backend/Ido/Query/ServicenotificationQuery.php | 1 + modules/monitoring/library/Monitoring/DataView/Notification.php | 1 + 4 files changed, 4 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php index d320e33f2..c7ffc3308 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostnotificationQuery.php @@ -38,6 +38,7 @@ class HostnotificationQuery extends IdoQuery 'notifications' => array( 'host_name' => 'ho.name1', 'notification_output' => 'hn.output', + 'notification_reason' => 'hn.notification_reason', 'notification_state' => 'hn.state', 'notification_timestamp' => 'UNIX_TIMESTAMP(hn.start_time)', 'object_type' => '(\'host\')' diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php index 8729cf25c..f85195123 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/NotificationQuery.php @@ -25,6 +25,7 @@ class NotificationQuery extends IdoQuery 'instance_name' => 'n.instance_name', 'notification_contact_name' => 'n.notification_contact_name', 'notification_output' => 'n.notification_output', + 'notification_reason' => 'n.notification_reason', 'notification_state' => 'n.notification_state', 'notification_timestamp' => 'n.notification_timestamp' ), diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicenotificationQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicenotificationQuery.php index ea89f61a7..4827632bb 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicenotificationQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicenotificationQuery.php @@ -38,6 +38,7 @@ class ServicenotificationQuery extends IdoQuery 'notifications' => array( 'host_name' => 'so.name1', 'notification_output' => 'sn.output', + 'notification_reason' => 'sn.notification_reason', 'notification_state' => 'sn.state', 'notification_timestamp' => 'UNIX_TIMESTAMP(sn.start_time)', 'object_type' => '(\'service\')', diff --git a/modules/monitoring/library/Monitoring/DataView/Notification.php b/modules/monitoring/library/Monitoring/DataView/Notification.php index b9a85cd2c..90755defd 100644 --- a/modules/monitoring/library/Monitoring/DataView/Notification.php +++ b/modules/monitoring/library/Monitoring/DataView/Notification.php @@ -15,6 +15,7 @@ class Notification extends DataView 'host_name', 'notification_contact_name', 'notification_output', + 'notification_reason', 'notification_state', 'notification_timestamp', 'object_type',