Skip to content

Commit

Permalink
[Monit] Change the monitoring period from 120 seconds to 60 seconds. (s…
Browse files Browse the repository at this point in the history
…onic-net#3974)

* [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 <yozhao@microsoft.com>
  • Loading branch information
yozhao101 authored and pphuchar committed Mar 9, 2020
1 parent ff8d2ec commit 71e853f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions files/image_config/monit/conf.d/sonic-host
Original file line number Diff line number Diff line change
Expand Up @@ -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 10 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 10 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 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 10 cycles then restart
if totalmem > 800 MB for 10 times within 20 cycles then restart
2 changes: 1 addition & 1 deletion files/image_config/monit/monitrc
Original file line number Diff line number Diff line change
Expand Up @@ -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 1-minute intervals
# with start delay 240 # optional: delay the first check by 4-minutes (by
# # default Monit check immediately after Monit start)
#
Expand Down

0 comments on commit 71e853f

Please sign in to comment.