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

Support syslog rate limit configuration for containers and host #2454

Merged

Conversation

Junchao-Mellanox
Copy link
Collaborator

HLD:
sonic-net/SONiC#1049

What I did

Support CLIs for syslog rate limit feature

How I did it

Support 4 new CLIs:

  1. config syslog rate-limit-host
  2. show syslog rate-limit-host
  3. config syslog rate-limit-container
  4. show syslog rate-limit-container

How to verify it

Unit test

Previous command output (if the output of a command-line utility has changed)

N/A

New command output (if the output of a command-line utility has changed)

Example:
show syslog rate-limit-host
INTERVAL     BURST
----------   --------
500          50000
show syslog rate-limit-container
SERVICE    INTERVAL     BURST
--------   ----------   --------
bgp        500          N/A
snmp       300          20000
swss       2000         12000
show syslog rate-limit-container bgp
SERVICE    INTERVAL     BURST
--------   ----------   --------
bgp        500          5000

@lgtm-com
Copy link

lgtm-com bot commented Oct 25, 2022

This pull request introduces 3 alerts when merging 238bd67 into c2841b8 - view on LGTM.com

new alerts:

  • 3 for Unused import

Copy link
Collaborator

@mkeda mkeda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work to add this feature!

syslog_util/common.py Outdated Show resolved Hide resolved
syslog_util/common.py Show resolved Hide resolved
syslog_util/common.py Show resolved Hide resolved
config/syslog.py Show resolved Hide resolved
config/syslog.py Outdated Show resolved Hide resolved
sonic_package_manager/service_creator/feature.py Outdated Show resolved Hide resolved
tests/syslog_test.py Outdated Show resolved Hide resolved
@Junchao-Mellanox
Copy link
Collaborator Author

Hi @mkeda, I have fixed/replied all comments. Would you please review the new changes?

mkeda
mkeda previously approved these changes Nov 15, 2022
@Junchao-Mellanox
Copy link
Collaborator Author

Hi @saiarcot895, thanks for the comments, I have fixed it, could you please continue reviewing?

@saiarcot895 saiarcot895 merged commit 10eb5ba into sonic-net:master Dec 7, 2022
StormLiangMS pushed a commit that referenced this pull request Dec 30, 2022
* Support syslog rate limit configuration for containers and host

* Fix LGTM

* Fix unit test issue

* Add syslog_util as a package

* Fix review comment

* Update feature.py
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.

4 participants