diff --git a/dockers/docker-sonic-telemetry/base_image_files/monit_telemetry b/dockers/docker-sonic-telemetry/base_image_files/monit_telemetry index b3ba8b25fe1a..3941aecd4b0c 100644 --- a/dockers/docker-sonic-telemetry/base_image_files/monit_telemetry +++ b/dockers/docker-sonic-telemetry/base_image_files/monit_telemetry @@ -2,4 +2,4 @@ ## Monit configuration for telemetry container ############################################################################### check program container_memory_telemetry with path "/usr/bin/memory_checker telemetry 419430400" - if status == 3 for 10 times within 20 cycles then exec "/usr/bin/restart_service telemetry" + if status == 3 for 10 times within 20 cycles then exec "/usr/bin/restart_service telemetry" repeat every 2 cycles diff --git a/files/image_config/monit/memory_checker b/files/image_config/monit/memory_checker index 4f7912c1e56c..3cd0f2d80225 100755 --- a/files/image_config/monit/memory_checker +++ b/files/image_config/monit/memory_checker @@ -85,6 +85,8 @@ def check_memory_usage(container_name, threshold_value): if mem_usage_bytes > threshold_value: print("[{}]: Memory usage ({} Bytes) is larger than the threshold ({} Bytes)!" .format(container_name, mem_usage_bytes, threshold_value)) + syslog.syslog(syslog.LOG_INFO, "[{}]: Memory usage ({} Bytes) is larger than the threshold ({} Bytes)!" + .format(container_name, mem_usage_bytes, threshold_value)) sys.exit(3) else: syslog.syslog(syslog.LOG_ERR, "[memory_checker] Failed to retrieve memory value from '{}'"