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

[Feature][debugcounterorch] Add support for configurable debug drop monitoring feature #3509

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arista-hpandya
Copy link

@arista-hpandya arista-hpandya commented Feb 10, 2025

Note: This change depends on sonic-net/sonic-swss-common#971
Fixes #3501
HLD: sonic-net/SONiC#806

What I did

  • Added logic to read configuration from the DEBUG_DROP_MONITOR table.
  • Added logic to generate syslogs if thresholds are met.
  • Added logic to toggle the feature off if desired.

Why I did it
To implement the persistent drop counter monitoring feature which allows users to configure thresholds for drop counters and receive syslog notifications when those thresholds are exceeded.

How I verified it

  • Existing unit tests were run using make check to ensure no functionality was affected.
  • Manual testing was performed on a SONiC switch to verify that the orchagent correctly reads the configuration, generates syslogs when thresholds are met, and can be toggled off.
  • Tested memory overhead: No memory overhead was observed
  • Tested CPU overhead:

image
image

Details if related
The configurable drop monitor feature reads the configuration from the DEBUG_DROP_MONITOR table, which includes the status (enabled/disabled), window size, drop count threshold, and incident count threshold. The orchagent periodically polls the drop counters and compares the counts against the configured thresholds. If the thresholds are exceeded, the orchagent generates a syslog message. The feature can be toggled off by setting the status to "disabled" in the DEBUG_DROP_MONITOR table.

- Adds logic to read configuration from DEBUG_DROP_MONITOR
- Adds logic to generate syslogs if thresholds are met
- Adds logic to toggle the feature off if desired
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arista-hpandya arista-hpandya changed the title [debugcounterorch] Add support for configurable debug drop monitoring feature [Feature][debugcounterorch] Add support for configurable debug drop monitoring feature Feb 10, 2025
if (key == "CONFIG")
task_status = updateDropMonitorConfig(values);
}
catch (const std::runtime_error& e)

Choose a reason for hiding this comment

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

will this exception be thrown from updateDropMonitorConfig()?

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.

[Feature] Add persistent drop monitor functionality
3 participants