sonic-buildimage/files/image_config/monit
yozhao101 37863ac854
[Monit] Restart telemetry container if memory usage is beyond the threshold (#7645)
Signed-off-by: Yong Zhao yozhao@microsoft.com

Why I did it
This PR aims to monitor the memory usage of streaming telemetry container and restart streaming telemetry container if memory usage is larger than the pre-defined threshold.

How I did it
I borrowed the system tool Monit to run a script memory_checker which will periodically check the memory usage of streaming telemetry container. If the memory usage of telemetry container is larger than the pre-defined threshold for 10 times during 20 cycles, then an alerting message will be written into syslog and at the same time Monit will run the script restart_service to restart the streaming telemetry container.

How to verify it
I verified this implementation on device str-7260cx3-acs-1.
2021-05-28 11:13:44 -07:00
..
conf.d Invoke disk check periodically. (#7374) 2021-05-26 17:59:08 -07:00
container_checker [container_checker] Use Feature table to get running containers (#7474) 2021-05-07 08:42:15 -07:00
memory_checker [Monit] Restart telemetry container if memory usage is beyond the threshold (#7645) 2021-05-28 11:13:44 -07:00
monitrc [Monit] Delay start of monitoring for 5 minutes (#4281) 2020-03-19 14:14:47 -07:00
process_checker [multi-asic] Enhancing monit process checker for multi-asic. (#6100) 2020-12-04 10:39:43 -08:00
restart_service [Monit] Restart telemetry container if memory usage is beyond the threshold (#7645) 2021-05-28 11:13:44 -07:00