From ea037581b256b29fc6af4fe262a6940467e73dae Mon Sep 17 00:00:00 2001 From: Renuka Manavalan <47282725+renukamanavalan@users.noreply.github.com> Date: Wed, 26 May 2021 17:59:08 -0700 Subject: [PATCH 1/2] 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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/files/image_config/monit/conf.d/sonic-host b/files/image_config/monit/conf.d/sonic-host index 5a67f7a9909b..651ebd6eb8de 100644 --- a/files/image_config/monit/conf.d/sonic-host +++ b/files/image_config/monit/conf.d/sonic-host @@ -20,3 +20,11 @@ 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" + every 5 cycles + if status != 0 for 3 cycle then alert repeat every 1 cycles + From ac6dda6d6c1fba4447f656ac77eb99bce01b6ed4 Mon Sep 17 00:00:00 2001 From: Renuka Manavalan Date: Tue, 12 Oct 2021 03:55:32 +0000 Subject: [PATCH 2/2] update syntax for 201811 --- files/image_config/monit/conf.d/sonic-host | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/files/image_config/monit/conf.d/sonic-host b/files/image_config/monit/conf.d/sonic-host index 651ebd6eb8de..fead24dc3149 100644 --- a/files/image_config/monit/conf.d/sonic-host +++ b/files/image_config/monit/conf.d/sonic-host @@ -25,6 +25,5 @@ check process rsyslog with pidfile /var/run/rsyslogd.pid # Raise syslog error message, in case of underlying issues # check program diskCheck with path "/usr/local/bin/disk_check.py" - every 5 cycles - if status != 0 for 3 cycle then alert repeat every 1 cycles + if status != 0 then alert