Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the regex for matching all ERR syslog #3282

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

wangxin
Copy link
Collaborator

@wangxin wangxin commented Apr 6, 2021

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

The default regex used by loganalyzer for matching any ERR log message is simply "ERR".
This regex can match any log messages with string "ERR" and could raise false alarms for
log message like below:

Apr 5 11:55:34.729009 vlab-01 INFO systemd[1]: run-docker-runtime\\x2drunc-moby-e5b9fe570311286438d6044a27c592b8d24d8d1033a9c90ea5e93507b6045017-runc.XrDERR.mount: Succeeded.

How did you do it?

This change improved the regex from "ERR" to " ERR ". Then it is able to catch any real "ERR" level log messages and raise less false alarm.

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

The default regex used by loganalyzer for matching any ERR log message is simply "ERR".
This regex can match any log messages with string "ERR" and could raise false alarms for
log message like below:
'Apr 5 11:55:34.729009 vlab-01 INFO systemd[1]: run-docker-runtime\\x2drunc-moby-e5b9fe570311286438d6044a27c592b8d24d8d1033a9c90ea5e93507b6045017-runc.XrDERR.mount: Succeeded.

This change improved the regex from "ERR" to " ERR ". Then it is able to catch any real
"ERR" level log messages and raise less false alarm.

Signed-off-by: Xin Wang <[email protected]>
@wangxin wangxin requested a review from a team April 6, 2021 11:39
@yxieca yxieca merged commit 99b0bae into sonic-net:master Apr 8, 2021
saravanansv pushed a commit to saravanansv/sonic-mgmt that referenced this pull request May 6, 2021
The default regex used by loganalyzer for matching any ERR log message is simply "ERR".
This regex can match any log messages with string "ERR" and could raise false alarms for
log message like below:
'Apr 5 11:55:34.729009 vlab-01 INFO systemd[1]: run-docker-runtime\\x2drunc-moby-e5b9fe570311286438d6044a27c592b8d24d8d1033a9c90ea5e93507b6045017-runc.XrDERR.mount: Succeeded.

This change improved the regex from "ERR" to " ERR ". Then it is able to catch any real
"ERR" level log messages and raise less false alarm.

Signed-off-by: Xin Wang <[email protected]>
@wangxin wangxin deleted the err-regex branch September 9, 2021 08:09
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
The default regex used by loganalyzer for matching any ERR log message is simply "ERR".
This regex can match any log messages with string "ERR" and could raise false alarms for
log message like below:
'Apr 5 11:55:34.729009 vlab-01 INFO systemd[1]: run-docker-runtime\\x2drunc-moby-e5b9fe570311286438d6044a27c592b8d24d8d1033a9c90ea5e93507b6045017-runc.XrDERR.mount: Succeeded.

This change improved the regex from "ERR" to " ERR ". Then it is able to catch any real
"ERR" level log messages and raise less false alarm.

Signed-off-by: Xin Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants