From fb8fbbe8f77eec180a27de00331e479d936ed017 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 27 Aug 2015 16:28:32 +0200 Subject: [PATCH 1/8] Provide new dashboard panes per default refs #6144 --- modules/monitoring/configuration.php | 87 +++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index fa95c3785..467a5a1ad 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -225,7 +225,7 @@ $section->add($this->translate('Monitoring Health'), array( )); /* - * Dashboard + * Current Incidents */ $dashboard = $this->dashboard($this->translate('Current Incidents')); $dashboard->add( @@ -240,3 +240,88 @@ $dashboard->add( $this->translate('Host Problems'), 'monitoring/list/hosts?host_problem=1&sort=host_severity' ); + +/* + * Overview + */ +$dashboard = $this->dashboard($this->translate('Overview')); +$dashboard->add( + $this->translate('Service Grid'), + 'monitoring/list/servicegrid?limit=15,18' +); +$dashboard->add( + $this->translate('Service Groups'), + '/monitoring/list/servicegroups' +); +$dashboard->add( + $this->translate('Host Groups'), + '/monitoring/list/hostgroups' +); + +/* + * Most Overdue + */ +$dashboard = $this->dashboard($this->translate('Overdue')); +$dashboard->add( + $this->translate('Acks Older Than Three Days'), + 'monitoring/list/comments?comment_type=Ack&comment_timestamp<-3 days' +); +$dashboard->add( + $this->translate('Downtimes Older Than Three Days'), + 'monitoring/list/downtimes?downtime_is_in_effect=1&downtime_scheduled_start<-3%20days&sort=downtime_start&dir=asc' +); +$dashboard->add( + $this->translate('Oldest Sticky Comments'), + 'monitoring/list/comments?comment_type=Ack&TODO' +); + +/* + * Muted Objects + */ +$dashboard = $this->dashboard($this->translate('Muted Objects')); +$dashboard->add( + $this->translate('Disabled Service Notifications'), + 'monitoring/list/services?service_notifications_enabled=0&limit=10' +); +$dashboard->add( + $this->translate('Disabled Host Notifications'), + 'monitoring/list/hosts?host_notifications_enabled=0&limit=10' +); +$dashboard->add( + $this->translate('Disabled Service Checks'), + 'monitoring/list/services?service_active_checks_enabled=0&limit=10' +); +$dashboard->add( + $this->translate('Disabled Host Checks'), + 'monitoring/list/hosts?host_active_checks_enabled=0&limit=10' +); + +/* + * Activity Stream + */ +$dashboard = $this->dashboard($this->translate('Activity Stream')); +$dashboard->add( + $this->translate('Todays Events'), + 'monitoring/list/eventhistory?timestamp>=-1%20days&sort=timestamp&dir=desc&limit=8' +); +$dashboard->add( + $this->translate('Hard State Changed'), + 'monitoring/list/eventhistory?type=hard_state&sort=timestamp&dir=desc&limit=8' +); +$dashboard->add( + $this->translate('Critical Event Grid'), + 'monitoring/list/eventgrid' +); +$dashboard->add( + $this->translate('Downtimes Started'), + 'monitoring/list/eventhistory?type=dt_start&sort=timestamp&dir=desc&limit=8' +); +$dashboard->add( + $this->translate('Downtimes Ended'), + 'monitoring/list/eventhistory?type=dt_end&sort=timestamp&dir=desc&limit=8' +); +$dashboard->add( + $this->translate('Notifications'), + 'monitoring/list/eventhistory?type=notify&sort=timestamp&dir=desc&limit=8' +); + From 39513587d9dbdc43a9671c9e2c7857a62eeaf285 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 27 Aug 2015 17:13:22 +0200 Subject: [PATCH 2/8] Remove event grid from activity stream refs #6144 --- modules/monitoring/configuration.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 467a5a1ad..d7f263e5c 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -308,10 +308,6 @@ $dashboard->add( $this->translate('Hard State Changed'), 'monitoring/list/eventhistory?type=hard_state&sort=timestamp&dir=desc&limit=8' ); -$dashboard->add( - $this->translate('Critical Event Grid'), - 'monitoring/list/eventgrid' -); $dashboard->add( $this->translate('Downtimes Started'), 'monitoring/list/eventhistory?type=dt_start&sort=timestamp&dir=desc&limit=8' From fa93b7e37267a42bbe39f1bcb1233b48611d311a Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 27 Aug 2015 17:15:15 +0200 Subject: [PATCH 3/8] Move notifications up to avoid breaks between related dashlets refs #6144 --- modules/monitoring/configuration.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index d7f263e5c..8740575ba 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -308,6 +308,10 @@ $dashboard->add( $this->translate('Hard State Changed'), 'monitoring/list/eventhistory?type=hard_state&sort=timestamp&dir=desc&limit=8' ); +$dashboard->add( + $this->translate('Notifications'), + 'monitoring/list/eventhistory?type=notify&sort=timestamp&dir=desc&limit=8' +); $dashboard->add( $this->translate('Downtimes Started'), 'monitoring/list/eventhistory?type=dt_start&sort=timestamp&dir=desc&limit=8' @@ -316,8 +320,3 @@ $dashboard->add( $this->translate('Downtimes Ended'), 'monitoring/list/eventhistory?type=dt_end&sort=timestamp&dir=desc&limit=8' ); -$dashboard->add( - $this->translate('Notifications'), - 'monitoring/list/eventhistory?type=notify&sort=timestamp&dir=desc&limit=8' -); - From 6ada9ce047b5ecb4778204c1a64511260fba7b68 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Mon, 31 Aug 2015 17:03:10 +0200 Subject: [PATCH 4/8] Provide dashlets for sticky-comments refs #6144 --- .../monitoring/application/controllers/ListController.php | 1 + modules/monitoring/configuration.php | 8 ++++++-- .../monitoring/library/Monitoring/DataView/Hoststatus.php | 3 ++- .../library/Monitoring/DataView/Servicestatus.php | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 44172f1ea..f30432686 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -155,6 +155,7 @@ class Monitoring_ListController extends Controller 'service_notes_url', 'service_active_checks_enabled', 'service_passive_checks_enabled', + 'service_acknowledgement_type', 'current_check_attempt' => 'service_current_check_attempt', 'max_check_attempts' => 'service_max_check_attempts' ), $this->addColumns()); diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 8740575ba..e1a8d58d2 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -271,8 +271,12 @@ $dashboard->add( 'monitoring/list/downtimes?downtime_is_in_effect=1&downtime_scheduled_start<-3%20days&sort=downtime_start&dir=asc' ); $dashboard->add( - $this->translate('Oldest Sticky Comments'), - 'monitoring/list/comments?comment_type=Ack&TODO' + $this->translate('Host Sticky Acknowledgements Older Than Three Days'), + '/monitoring/list/hosts?host_acknowledgement_type=2&host_last_state_change<-3%20days' +); +$dashboard->add( + $this->translate('Service Sticky Acknowledgements, Older Than Three Days'), + '/monitoring/list/services?service_acknowledgement_type=2&service_last_state_change<-3%20days' ); /* diff --git a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php index 05385763c..413f175f1 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php @@ -58,7 +58,8 @@ class HostStatus extends DataView 'host_modified_host_attributes', 'host_severity', 'host_problem', - 'host_ipv4' + 'host_ipv4', + 'host_acknowledgement_type' ); } diff --git a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php index ff68474f1..f12c66535 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php @@ -92,7 +92,8 @@ class ServiceStatus extends DataView 'service_flap_detection_enabled', 'service_flap_detection_enabled_changed', 'service_modified_service_attributes', - 'service_host_name' + 'service_host_name', + 'service_acknowledgement_type' ); } From 1964cc53d56b60fc93bd099b32e75a81a629d965 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Tue, 1 Sep 2015 17:59:04 +0200 Subject: [PATCH 5/8] Revert "Provide dashlets for sticky-comments" This reverts commit 6ada9ce047b5ecb4778204c1a64511260fba7b68. --- .../monitoring/application/controllers/ListController.php | 1 - modules/monitoring/configuration.php | 8 ++------ .../monitoring/library/Monitoring/DataView/Hoststatus.php | 3 +-- .../library/Monitoring/DataView/Servicestatus.php | 3 +-- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index f30432686..44172f1ea 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -155,7 +155,6 @@ class Monitoring_ListController extends Controller 'service_notes_url', 'service_active_checks_enabled', 'service_passive_checks_enabled', - 'service_acknowledgement_type', 'current_check_attempt' => 'service_current_check_attempt', 'max_check_attempts' => 'service_max_check_attempts' ), $this->addColumns()); diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index e1a8d58d2..8740575ba 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -271,12 +271,8 @@ $dashboard->add( 'monitoring/list/downtimes?downtime_is_in_effect=1&downtime_scheduled_start<-3%20days&sort=downtime_start&dir=asc' ); $dashboard->add( - $this->translate('Host Sticky Acknowledgements Older Than Three Days'), - '/monitoring/list/hosts?host_acknowledgement_type=2&host_last_state_change<-3%20days' -); -$dashboard->add( - $this->translate('Service Sticky Acknowledgements, Older Than Three Days'), - '/monitoring/list/services?service_acknowledgement_type=2&service_last_state_change<-3%20days' + $this->translate('Oldest Sticky Comments'), + 'monitoring/list/comments?comment_type=Ack&TODO' ); /* diff --git a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php index 413f175f1..05385763c 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php @@ -58,8 +58,7 @@ class HostStatus extends DataView 'host_modified_host_attributes', 'host_severity', 'host_problem', - 'host_ipv4', - 'host_acknowledgement_type' + 'host_ipv4' ); } diff --git a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php index f12c66535..ff68474f1 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php @@ -92,8 +92,7 @@ class ServiceStatus extends DataView 'service_flap_detection_enabled', 'service_flap_detection_enabled_changed', 'service_modified_service_attributes', - 'service_host_name', - 'service_acknowledgement_type' + 'service_host_name' ); } From 0738a37fdf88320c41a7078df49463231b9d61df Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Sep 2015 16:35:41 +0200 Subject: [PATCH 6/8] Display sticky comments in "Muted" tab refs #6144 --- modules/monitoring/configuration.php | 38 ++++++++++++++----- .../Monitoring/DataView/Hoststatus.php | 3 +- .../Monitoring/DataView/Servicestatus.php | 3 +- 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 755538625..6456686e9 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -265,22 +265,18 @@ $dashboard->add( */ $dashboard = $this->dashboard($this->translate('Overdue')); $dashboard->add( - $this->translate('Acks Older Than Three Days'), - 'monitoring/list/comments?comment_type=Ack&comment_timestamp<-3 days' + $this->translate('Acknowledgements Active For At Least Three Days'), + 'monitoring/list/comments?comment_type=Ack&comment_timestamp<-3 days&sort=comment_timestamp&dir=asc' ); $dashboard->add( - $this->translate('Downtimes Older Than Three Days'), + $this->translate('Downtimes Active For More Than Three Days'), 'monitoring/list/downtimes?downtime_is_in_effect=1&downtime_scheduled_start<-3%20days&sort=downtime_start&dir=asc' ); -$dashboard->add( - $this->translate('Oldest Sticky Comments'), - 'monitoring/list/comments?comment_type=Ack&TODO' -); /* * Muted Objects */ -$dashboard = $this->dashboard($this->translate('Muted Objects')); +$dashboard = $this->dashboard($this->translate('Muted')); $dashboard->add( $this->translate('Disabled Service Notifications'), 'monitoring/list/services?service_notifications_enabled=0&limit=10' @@ -297,6 +293,14 @@ $dashboard->add( $this->translate('Disabled Host Checks'), 'monitoring/list/hosts?host_active_checks_enabled=0&limit=10' ); +$dashboard->add( + $this->translate('Acknowledged Problem Services'), + 'monitoring/list/services?service_acknowledgement_type=2&service_problem=1&sort=service_state&limit=10' +); +$dashboard->add( + $this->translate('Acknowledged Problem Hosts'), + 'monitoring/list/hosts?host_acknowledgement_type=2&host_problem=1&sort=host_severity&limit=10' +); /* * Activity Stream @@ -323,9 +327,25 @@ $dashboard->add( 'monitoring/list/eventhistory?type=dt_end&sort=timestamp&dir=desc&limit=8' ); +/* + * Stats + */ +$dashboard = $this->dashboard($this->translate('Stats')); +$dashboard->add( + $this->translate('Weekly Alert Summary'), + 'monitoring/alertsummary/index?limit=5&interval=1w' +); +$dashboard->add( + $this->translate('Check Stats'), + 'monitoring/health/stats' +); +$dashboard->add( + $this->translate('Process Information'), + 'monitoring/health/info' +); + /* * CSS */ $this->provideCssFile('colors.less'); $this->provideCssFile('service-grid.less'); - diff --git a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php index 05385763c..413f175f1 100644 --- a/modules/monitoring/library/Monitoring/DataView/Hoststatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Hoststatus.php @@ -58,7 +58,8 @@ class HostStatus extends DataView 'host_modified_host_attributes', 'host_severity', 'host_problem', - 'host_ipv4' + 'host_ipv4', + 'host_acknowledgement_type' ); } diff --git a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php index ff68474f1..f12c66535 100644 --- a/modules/monitoring/library/Monitoring/DataView/Servicestatus.php +++ b/modules/monitoring/library/Monitoring/DataView/Servicestatus.php @@ -92,7 +92,8 @@ class ServiceStatus extends DataView 'service_flap_detection_enabled', 'service_flap_detection_enabled_changed', 'service_modified_service_attributes', - 'service_host_name' + 'service_host_name', + 'service_acknowledgement_type' ); } From 78d679b597a30bed3091b0df39e8a2fb9f3de4dc Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Sep 2015 17:09:24 +0200 Subject: [PATCH 7/8] Fix typos and limit activity stream to 3 days refs #6144 --- modules/monitoring/configuration.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index 6456686e9..d17a3b012 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -307,24 +307,24 @@ $dashboard->add( */ $dashboard = $this->dashboard($this->translate('Activity Stream')); $dashboard->add( - $this->translate('Todays Events'), - 'monitoring/list/eventhistory?timestamp>=-1%20days&sort=timestamp&dir=desc&limit=8' + $this->translate('Recent Events'), + 'monitoring/list/eventhistory?timestamp>=-3%20days&sort=timestamp&dir=desc&limit=8' ); $dashboard->add( - $this->translate('Hard State Changed'), - 'monitoring/list/eventhistory?type=hard_state&sort=timestamp&dir=desc&limit=8' + $this->translate('Recent Hard State Changes'), + 'monitoring/list/eventhistory?timestamp>=-3%20days&type=hard_state&sort=timestamp&dir=desc&limit=8' ); $dashboard->add( - $this->translate('Notifications'), - 'monitoring/list/eventhistory?type=notify&sort=timestamp&dir=desc&limit=8' + $this->translate('Recent Notifications'), + 'monitoring/list/eventhistory?timestamp>=-3%20days&type=notify&sort=timestamp&dir=desc&limit=8' ); $dashboard->add( - $this->translate('Downtimes Started'), - 'monitoring/list/eventhistory?type=dt_start&sort=timestamp&dir=desc&limit=8' + $this->translate('Recent Downtimes Started'), + 'monitoring/list/eventhistory?timestamp>=-3%20days&type=dt_start&sort=timestamp&dir=desc&limit=8' ); $dashboard->add( - $this->translate('Downtimes Ended'), - 'monitoring/list/eventhistory?type=dt_end&sort=timestamp&dir=desc&limit=8' + $this->translate('Recent Downtimes Ended'), + 'monitoring/list/eventhistory?timestamp>=-3%20days&type=dt_end&sort=timestamp&dir=desc&limit=8' ); /* From 14565dad34aca87b3ec61fa6457c25881af61861 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Fri, 4 Sep 2015 17:10:18 +0200 Subject: [PATCH 8/8] Remove obsolete alert summary from stats refs #6144 --- modules/monitoring/configuration.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/monitoring/configuration.php b/modules/monitoring/configuration.php index d17a3b012..fb4d0ea79 100644 --- a/modules/monitoring/configuration.php +++ b/modules/monitoring/configuration.php @@ -331,10 +331,6 @@ $dashboard->add( * Stats */ $dashboard = $this->dashboard($this->translate('Stats')); -$dashboard->add( - $this->translate('Weekly Alert Summary'), - 'monitoring/alertsummary/index?limit=5&interval=1w' -); $dashboard->add( $this->translate('Check Stats'), 'monitoring/health/stats'