From 52366b099d936d2fb9a174ae7ab7a03c404c55b6 Mon Sep 17 00:00:00 2001 From: Renuka Manavalan <47282725+renukamanavalan@users.noreply.github.com> Date: Fri, 15 Oct 2021 19:43:05 -0700 Subject: [PATCH] [201811] Invoke disk check periodically (#8951) * Invoke disk check periodically. (#7374) Why I did it Helps with periodic scan of disk for RO state. If found, this script makes transient fix and raise error message. --- files/image_config/monit/conf.d/sonic-host | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/files/image_config/monit/conf.d/sonic-host b/files/image_config/monit/conf.d/sonic-host index 5a67f7a9909b..fead24dc3149 100644 --- a/files/image_config/monit/conf.d/sonic-host +++ b/files/image_config/monit/conf.d/sonic-host @@ -20,3 +20,10 @@ 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/local/bin/disk_check.py" + if status != 0 then alert +