From a738c39328b3e069a83162fe036ae693a8bd3d27 Mon Sep 17 00:00:00 2001 From: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com> Date: Mon, 8 May 2023 11:48:17 -0700 Subject: [PATCH] Add fix to monit_regex.json for catching mem_usage and cpu_usage (#14954) Why I did it Current regex not able to capture logs, modify regex to capture syslog messages Work item tracking Microsoft ADO (number only): 13366345 How I did it Code change How to verify it sonic-mgmt test case --- files/build_templates/monit_regex.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/build_templates/monit_regex.json b/files/build_templates/monit_regex.json index e7384a5434..201636c3a3 100644 --- a/files/build_templates/monit_regex.json +++ b/files/build_templates/monit_regex.json @@ -6,12 +6,12 @@ }, { "tag": "memory-usage", - "regex": "mem usage of (\\d+\\.\\d+)% matches resource limit .mem usage>(\\d+\\.\\d+)%.", + "regex": ".*mem usage of (\\d+\\.\\d+)% matches resource limit .mem usage>(\\d+\\.\\d+)%.", "params": [ "usage", "limit" ] }, { "tag": "cpu-usage", - "regex": "cpu user usage of (\\d+\\.\\d+)% matches resource limit .cpu user usage>(\\d+\\.\\d+)%.", + "regex": ".*cpu user usage of (\\d+\\.\\d+)% matches resource limit .cpu user usage>(\\d+\\.\\d+)%.", "params": [ "usage", "limit" ] } ]