From 312771dc3e1e2c41d4d6c685c93db8f5be1c9547 Mon Sep 17 00:00:00 2001 From: Renuka Manavalan <47282725+renukamanavalan@users.noreply.github.com> Date: Tue, 4 Aug 2020 10:33:13 -0700 Subject: [PATCH] [monit] Periodically monitor route consistency (#5085) * Add route_check to mont. * Switched to units of cycles per comments * Added comments per Joe's comments. * Added more comments per Royal's comments. --- files/image_config/monit/conf.d/sonic-host | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/files/image_config/monit/conf.d/sonic-host b/files/image_config/monit/conf.d/sonic-host index 5a67f7a990..0a881eb76f 100644 --- a/files/image_config/monit/conf.d/sonic-host +++ b/files/image_config/monit/conf.d/sonic-host @@ -20,3 +20,13 @@ 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 + +# route_check.py Verify routes between APPL-DB & ASIC-DB are in sync. +# For any discrepancy, details are logged and a non-zero code is returned +# which would trigger a monit alert. +# Hence for any discrepancy, there will be log messages for "ERR" level +# from both route_check.py & monit. +# +check program routeCheck with path "/usr/bin/route_check.py" + every 5 cycles + if status != 0 then alert