-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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]: Use RELP instead of UDP for forwarding from container to host #18113
Open
saiarcot895
wants to merge
19
commits into
sonic-net:master
Choose a base branch
from
saiarcot895:rsyslog-use-relp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−121
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e348e26
[rsyslog]: Use RELP instead of UDP for forwarding from container to host
saiarcot895 e275fd2
Try to fix repeated messages being logged, and clean up templates
saiarcot895 af610f2
Fix errors about $SystemLogRateLimitInterval and $SystemLogRateLimitB…
saiarcot895 1df7538
Modify omrelp to store messages in memory if the server is unavailable
saiarcot895 7c937cc
Merge remote-tracking branch 'origin/master' into rsyslog-use-relp
saiarcot895 dd7af0a
Update rsyslog.conf file for Bookworm
saiarcot895 6ebca5f
Merge remote-tracking branch 'origin/master' into rsyslog-use-relp
saiarcot895 ed01b28
Install rsyslog-relp for Bookworm
saiarcot895 bbe163b
Use new syntax for specifying rate limiting interval and burst
saiarcot895 e030511
Revert template change to match what is currently on master branch
saiarcot895 ab995b0
Restore the RepeatedMsgReduction config option
saiarcot895 d57c5ba
Merge remote-tracking branch 'origin/master' into rsyslog-use-relp
saiarcot895 4d8056b
Update rsyslog.conf file for pmon docker
saiarcot895 bf9cda9
Remove extra newlines
saiarcot895 d5edef8
Add (or re-add) retry support into the default `/etc/rsyslog.conf` files
saiarcot895 20e8621
If tests fail, print the diff as the error message
saiarcot895 5310d94
Merge remote-tracking branch 'origin/master' into rsyslog-use-relp
saiarcot895 5444c45
Merge remote-tracking branch 'origin/master' into rsyslog-use-relp
saiarcot895 dce24d6
Set a limit of 20000 messages to be queued
saiarcot895 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,34 +13,28 @@ | |
#### MODULES #### | ||
################# | ||
|
||
$ModLoad imuxsock # provides support for local system logging | ||
|
||
{% set gconf = (SYSLOG_CONFIG | d({})).get('GLOBAL', {}) -%} | ||
{% set rate_limit_interval = gconf.get('rate_limit_interval') %} | ||
{% set rate_limit_burst = gconf.get('rate_limit_burst') %} | ||
{% set rate_limit_interval = gconf.get('rate_limit_interval') -%} | ||
{% set rate_limit_burst = gconf.get('rate_limit_burst') -%} | ||
|
||
{% if rate_limit_interval is not none %} | ||
$SystemLogRateLimitInterval {{ rate_limit_interval }} | ||
{% endif %} | ||
{% if rate_limit_burst is not none %} | ||
$SystemLogRateLimitBurst {{ rate_limit_burst }} | ||
{% endif %} | ||
|
||
$ModLoad imklog # provides kernel logging support | ||
#$ModLoad immark # provides --MARK-- message capability | ||
module(load="imuxsock" {% if rate_limit_interval is not none %}SysSock.RateLimit.Interval="{{ rate_limit_interval }}"{% endif %} {% if rate_limit_burst is not none %}SysSock.RateLimit.Burst="{{ rate_limit_burst }}"{% endif %}) # provides support for local system logging | ||
module(load="imklog") # provides kernel logging support | ||
#module(load="immark") # provides --MARK-- message capability | ||
|
||
# provides UDP syslog reception | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @saiarcot895 This UDP syslog is for remote server? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, in the case of a remote syslog server sending over UDP. |
||
$ModLoad imudp | ||
$UDPServerAddress {{udp_server_ip}} #bind to localhost before udp server run | ||
$UDPServerRun 514 | ||
{% if docker0_ip and docker0_ip != "" %} | ||
$UDPServerAddress {{docker0_ip}} | ||
$UDPServerRun 514 | ||
{% endif%} | ||
#module(load="imudp") | ||
#input(type="imudp" port="514") | ||
|
||
# provides TCP syslog reception | ||
#$ModLoad imtcp | ||
#$InputTCPServerRun 514 | ||
#module(load="imtcp") | ||
#input(type="imtcp" port="514") | ||
|
||
# provides RELP syslog reception | ||
module(load="imrelp") | ||
input(type="imrelp" address="{{udp_server_ip}}" port="2514") | ||
{% if docker0_ip and docker0_ip != "" %} | ||
input(type="imrelp" address="{{docker0_ip}}" port="2514") | ||
{% endif%} | ||
|
||
|
||
########################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saiarcot895 can you mention this syntax change in PR description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.