sonic-buildimage/files/image_config/monit/conf.d/sonic-host
Renuka Manavalan 2a41e0f96b
[201811] disk_check.py: Change path to /usr/bin (#9074)
The scripts from sonic-utilities are installed into /usr/bin in 201811.
Hence correct path for disk_check.py to /usr/bin/
2021-10-26 18:22:10 -07:00

30 lines
1.2 KiB
Plaintext

###############################################################################
## Monit configuration for SONiC host OS
##
## This includes system-level monitoring as well as processes which
## run in the host OS (i.e., not inside a Docker container)
###############################################################################
check filesystem root-overlay with path /
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 10 times within 20 cycles then alert
check system $HOST
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 10 times within 20 cycles then restart
# Check if /etc & /home are writable. If not, make them writable.
# Raise syslog error message, in case of underlying issues
#
check program diskCheck with path "/usr/bin/disk_check.py"
if status != 0 then alert