Skip to content

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

Merged
prsunny merged 3 commits intosonic-net:masterfrom
arista-hpandya:add-drop-monitor-logic-in-debugcounterorch
Oct 6, 2025
Merged

[Feature][debugcounterorch] Add support for configurable debug drop monitoring feature#3509
prsunny merged 3 commits intosonic-net:masterfrom
arista-hpandya:add-drop-monitor-logic-in-debugcounterorch

Conversation

@arista-hpandya
Copy link
Contributor

@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#1912

What I did

  • Added logic to read configuration from the DEBUG_DROP_MONITOR table.
  • Added logic to register persistent alerts when the conditions are met.
  • Added logic to toggle the feature off if desired on a per-counter level.

Why I did it
To implement the persistent drop counter monitoring feature which allows users to configure thresholds for drop counters and register alerts when persistent drops are detected.

How I verified it

  • Existing unit tests were run using make check to ensure no functionality was affected.
  • New unit tests have been added to verify the functionality.
  • Manual testing was performed on a SONiC switch to verify that the orchagent correctly reads the configuration, generates alerts when thresholds are met, and can be toggled off/on.

Details if related
The configurable drop monitor feature reads he status (enabled/disabled) from the DEBUG_DROP_MONITOR table. The orchagent periodically (every minute) polls the drop counters and compares the counts against the configured thresholds. If the thresholds are exceeded, the orchagent generates a persistent alert which is stored in the PERSISTENT_DROP_ALERTS table in Counters DB. The feature can be toggled on/off for all drop counters or it can be turned on/off for a specific drop counter. The corresponding CLI to do so can be found in the CLI PR attached in the umbrella issue: sonic-net/SONiC#1542

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
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
@arista-hpandya arista-hpandya marked this pull request as draft February 18, 2025 17:44
@arista-hpandya arista-hpandya force-pushed the add-drop-monitor-logic-in-debugcounterorch branch from 5ed2131 to 03d5fc1 Compare May 15, 2025 17:51
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arista-hpandya arista-hpandya marked this pull request as ready for review May 15, 2025 17:53
@arista-hpandya
Copy link
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vmittal-msft vmittal-msft self-requested a review June 16, 2025 23:11
@vmittal-msft
Copy link
Contributor

@arista-hpandya please help rebase.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vmittal-msft
Copy link
Contributor

@arista-hpandya please re-base.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arista-hpandya
Copy link
Contributor Author

Hi @vmittal-msft did you get a chance to go over the changes? Let me know if there are any clarifications you need from my end. Thank you!

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 3509 in repo sonic-net/sonic-swss

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vmittal-msft
Copy link
Contributor

@arista-hpandya please rebase again.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arista-hpandya arista-hpandya force-pushed the add-drop-monitor-logic-in-debugcounterorch branch from 80cdefb to 2ec65ee Compare October 1, 2025 16:57
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arista-hpandya arista-hpandya force-pushed the add-drop-monitor-logic-in-debugcounterorch branch from 2ec65ee to f6ee696 Compare October 1, 2025 17:44
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vmittal-msft
Copy link
Contributor

@prsunny please help merge.

- Adds logic to read configuration from DEBUG_DROP_MONITOR
- Adds drop_monitor.lua script to implement drop counter monitoring
- Adds logic to toggle the feature off if desired
@arista-hpandya arista-hpandya force-pushed the add-drop-monitor-logic-in-debugcounterorch branch from f6ee696 to 52250e3 Compare October 2, 2025 16:13
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arista-hpandya
Copy link
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arista-hpandya
Copy link
Contributor Author

@prsunny Can we please merge this? Looks like the PR requires an approval from you and @dgsudharsan . Thank you!

Copy link
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

lgtm, @theasianpianist for viz

@prsunny prsunny merged commit 1b3f738 into sonic-net:master Oct 6, 2025
15 checks passed
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
…onitoring feature (sonic-net#3509)

* Add support for configurable debug drop monitoring feature

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

What I did

Added logic to read configuration from the DEBUG_DROP_MONITOR table.
Added logic to register persistent alerts when the conditions are met.
Added logic to toggle the feature off if desired on a per-counter level.
Why I did it
To implement the persistent drop counter monitoring feature which allows users to configure thresholds for drop counters and register alerts when persistent drops are detected.

How I verified it

Existing unit tests were run using make check to ensure no functionality was affected.
New unit tests have been added to verify the functionality.
Manual testing was performed on a SONiC switch to verify that the orchagent correctly reads the configuration, generates alerts when thresholds are met, and can be toggled off/on.
balanokia pushed a commit to balanokia/sonic-swss that referenced this pull request Nov 17, 2025
…onitoring feature (sonic-net#3509)

* Add support for configurable debug drop monitoring feature

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

What I did

Added logic to read configuration from the DEBUG_DROP_MONITOR table.
Added logic to register persistent alerts when the conditions are met.
Added logic to toggle the feature off if desired on a per-counter level.
Why I did it
To implement the persistent drop counter monitoring feature which allows users to configure thresholds for drop counters and register alerts when persistent drops are detected.

How I verified it

Existing unit tests were run using make check to ensure no functionality was affected.
New unit tests have been added to verify the functionality.
Manual testing was performed on a SONiC switch to verify that the orchagent correctly reads the configuration, generates alerts when thresholds are met, and can be toggled off/on.
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Feb 4, 2026
…onitoring feature (sonic-net#3509)

* Add support for configurable debug drop monitoring feature

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

What I did

Added logic to read configuration from the DEBUG_DROP_MONITOR table.
Added logic to register persistent alerts when the conditions are met.
Added logic to toggle the feature off if desired on a per-counter level.
Why I did it
To implement the persistent drop counter monitoring feature which allows users to configure thresholds for drop counters and register alerts when persistent drops are detected.

How I verified it

Existing unit tests were run using make check to ensure no functionality was affected.
New unit tests have been added to verify the functionality.
Manual testing was performed on a SONiC switch to verify that the orchagent correctly reads the configuration, generates alerts when thresholds are met, and can be toggled off/on.

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
…onitoring feature (sonic-net#3509)

* Add support for configurable debug drop monitoring feature

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

What I did

Added logic to read configuration from the DEBUG_DROP_MONITOR table.
Added logic to register persistent alerts when the conditions are met.
Added logic to toggle the feature off if desired on a per-counter level.
Why I did it
To implement the persistent drop counter monitoring feature which allows users to configure thresholds for drop counters and register alerts when persistent drops are detected.

How I verified it

Existing unit tests were run using make check to ensure no functionality was affected.
New unit tests have been added to verify the functionality.
Manual testing was performed on a SONiC switch to verify that the orchagent correctly reads the configuration, generates alerts when thresholds are met, and can be toggled off/on.

Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
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

6 participants