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

[rsyslog]: Remote logging with the highest rule priority #21923

Merged
merged 2 commits into from
Mar 9, 2025

Conversation

nazariig
Copy link
Collaborator

@nazariig nazariig commented Mar 4, 2025

Why I did it

This fix resolves issue with missing certain types of messages while forwarding to the remote server.

Basically, this moves remote syslog forwarding rules to be executed before any other instructions take place,
so everything received by a local syslog instance will be forwarded to the remote machine.

The fix allows remote forwarding of messages defined as:
https://github.com/sonic-net/sonic-buildimage/blob/master/files/image_config/rsyslog/rsyslog.d/00-sonic.conf.j2

Work item tracking

  • N/A

How I did it

  • Moved rsyslog remote forwarding rules to be on top of other syslog instructions

How to verify it

  1. Enable remote syslog forwarding
  2. Check for message patterns defined as 00-sonic.conf.j2

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

  • master

Description for the changelog

  • N/A

Link to config_db schema for YANG module changes

  • N/A

A picture of a cute animal (not mandatory but encouraged)

      .---.        .-----------
     /     \  __  /    ------
    / /     \(  )/    -----
   //////   ' \/ `   ---
  //// / // :    : ---
 // /   /  /`    '--
//          //..\\
       ====UU====UU====
           '//||\\`
             ''``

@nazariig nazariig added Bug 🐛 bugfix the PR is a bug fix PR labels Mar 4, 2025
@nazariig nazariig requested a review from qiluo-msft March 4, 2025 19:17
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@nazariig nazariig force-pushed the master-syslog-fix branch from 1274b0f to 4059958 Compare March 5, 2025 10:34
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

nazariig added 2 commits March 5, 2025 14:14
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zbud-msft
Copy link
Contributor

zbud-msft commented Mar 6, 2025

@nazariig Can you please raise PR in sonic-mgmt that provides testcase for this fix, since there was a test gap?

@zbud-msft
Copy link
Contributor

@nazariig There is conflict in 202305/202311 branches, can you please raise PR to these branches?

@qiluo-msft qiluo-msft marked this pull request as ready for review March 9, 2025 17:37
@qiluo-msft qiluo-msft requested a review from lguohan as a code owner March 9, 2025 17:37
@qiluo-msft qiluo-msft merged commit 4e318ac into sonic-net:master Mar 9, 2025
21 checks passed
@kperumalbfn
Copy link
Contributor

@nazariig could you please create a PR for 202411 due to conflict.

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #22020

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #22021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants