From edb98861a5ed95a78035ff20f2ab040d770bf33a Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Fri, 3 Jan 2020 15:39:15 -0800 Subject: [PATCH 1/4] [Monit] Change the monitoring period from 120 seconds to 60 seconds. Signed-off-by: Yong Zhao --- files/image_config/monit/monitrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/monit/monitrc b/files/image_config/monit/monitrc index f9350733fa44..1f46fdcd24f6 100644 --- a/files/image_config/monit/monitrc +++ b/files/image_config/monit/monitrc @@ -16,7 +16,7 @@ ## ## Start Monit in the background (run as a daemon): # - set daemon 120 # check services at 2-minute intervals + set daemon 60 # check services at 2-minute intervals # with start delay 240 # optional: delay the first check by 4-minutes (by # # default Monit check immediately after Monit start) # From fac8e802db63381a1d5defad853ccca93a26ac4b Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Fri, 3 Jan 2020 15:43:46 -0800 Subject: [PATCH 2/4] [Monit] Change the comment in monitrc. Signed-off-by: Yong Zhao --- files/image_config/monit/monitrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/monit/monitrc b/files/image_config/monit/monitrc index 1f46fdcd24f6..7050a58d73cd 100644 --- a/files/image_config/monit/monitrc +++ b/files/image_config/monit/monitrc @@ -16,7 +16,7 @@ ## ## Start Monit in the background (run as a daemon): # - set daemon 60 # check services at 2-minute intervals + set daemon 60 # check services at 1-minute intervals # with start delay 240 # optional: delay the first check by 4-minutes (by # # default Monit check immediately after Monit start) # From 8d136e9890da731d2e7b7759541fb6824af5150f Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Fri, 3 Jan 2020 17:57:46 -0800 Subject: [PATCH 3/4] [Monit] Change the monitoring period of monit from 120 seconds to 60 seconds and also at the same time double the interval for existing sonic monit config file in host. Signed-off-by: Yong Zhao --- files/image_config/monit/conf.d/sonic-host | 12 ++++++------ files/image_config/monit/monitrc | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/image_config/monit/conf.d/sonic-host b/files/image_config/monit/conf.d/sonic-host index 8eaa1671d821..c5bf412de8ae 100644 --- a/files/image_config/monit/conf.d/sonic-host +++ b/files/image_config/monit/conf.d/sonic-host @@ -6,17 +6,17 @@ ############################################################################### check filesystem root-overlay with path / - if space usage > 90% for 5 times within 10 cycles then alert + if space usage > 90% for 5 times within 20 cycles then alert check filesystem var-log with path /var/log - if space usage > 90% for 5 times within 10 cycles then alert + if space usage > 90% for 5 times within 20 cycles then alert check system $HOST - if memory usage > 90% for 5 times within 10 cycles then alert - if cpu usage (user) > 90% for 5 times within 10 cycles then alert - if cpu usage (system) > 90% for 5 times within 10 cycles then alert + if memory usage > 90% for 5 times within 20 cycles then alert + if cpu usage (user) > 90% for 5 times within 20 cycles then alert + if cpu usage (system) > 90% for 5 times within 20 cycles then alert check process rsyslog with pidfile /var/run/rsyslogd.pid start program = "/bin/systemctl start rsyslog.service" stop program = "/bin/systemctl stop rsyslog.service" - if totalmem > 800 MB for 5 times within 10 cycles then restart + if totalmem > 800 MB for 5 times within 20 cycles then restart diff --git a/files/image_config/monit/monitrc b/files/image_config/monit/monitrc index 12c3b3f799c2..3c3714882dcc 100644 --- a/files/image_config/monit/monitrc +++ b/files/image_config/monit/monitrc @@ -16,7 +16,7 @@ ## ## Start Monit in the background (run as a daemon): # - set daemon 60 # check services at 1-minute intervals + set daemon 60 # check services at 1-minute intervals # with start delay 240 # optional: delay the first check by 4-minutes (by # # default Monit check immediately after Monit start) # From 579d8679b1afe0f52588ab46f2d2f7df5ff8cc39 Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Fri, 3 Jan 2020 18:12:43 -0800 Subject: [PATCH 4/4] [Monit] Double the hit times from 5 to 10. Signed-off-by: Yong Zhao --- files/image_config/monit/conf.d/sonic-host | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/files/image_config/monit/conf.d/sonic-host b/files/image_config/monit/conf.d/sonic-host index c5bf412de8ae..5a67f7a9909b 100644 --- a/files/image_config/monit/conf.d/sonic-host +++ b/files/image_config/monit/conf.d/sonic-host @@ -6,17 +6,17 @@ ############################################################################### check filesystem root-overlay with path / - if space usage > 90% for 5 times within 20 cycles then alert + if space usage > 90% for 10 times within 20 cycles then alert check filesystem var-log with path /var/log - if space usage > 90% for 5 times within 20 cycles then alert + if space usage > 90% for 10 times within 20 cycles then alert check system $HOST - if memory usage > 90% for 5 times within 20 cycles then alert - if cpu usage (user) > 90% for 5 times within 20 cycles then alert - if cpu usage (system) > 90% for 5 times within 20 cycles then alert + if memory usage > 90% for 10 times within 20 cycles then alert + if cpu usage (user) > 90% for 10 times within 20 cycles then alert + if cpu usage (system) > 90% for 10 times within 20 cycles then alert check process rsyslog with pidfile /var/run/rsyslogd.pid start program = "/bin/systemctl start rsyslog.service" stop program = "/bin/systemctl stop rsyslog.service" - if totalmem > 800 MB for 5 times within 20 cycles then restart + if totalmem > 800 MB for 10 times within 20 cycles then restart