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

[xcvrd] silence port update event warnings #567

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bradh352
Copy link

@bradh352 bradh352 commented Dec 1, 2024

Description

All port events are currently logged at the WARNING level. Reduce to NOTICE.

Example:

2024 Dec  1 15:31:29.155436 sw2 WARNING pmon#xcvrd[32]: $$$ Ethernet0 handle_port_update_event() : op=SET DB:STATE_DB Table:TRANSCEIVER_INFO fvp {'type': 'SFP/SFP+/SFP28', 'dom_capability': 'N/A', 'encoding': 'NRZ', 'nominal_bit_rate': '255', 'manufacturer': 'FS              ', 'is_replaceable': 'False', 'specification_compliance': "{'10G Ethernet Compliance': '10GBASE-LR', 'Infiniband Compliance': 'Unknown', 'ESCON Compliance': 'Unknown', 'SONET Compliance Codes': 'Unknown', 'Ethernet Compliance': 'Unknown', 'Fibre Channel Link Length': 'Short distance (S)', 'Fibre Channel Transmitter Technology': 'Unknown', 'SFP+CableTechnology': 'Unknown', 'Fibre Channel Transmission Media': 'Unknown', 'Fibre Channel Speed': 'Unknown'}", 'vendor_date': '2024-07-27   ', 'vendor_rev': '1A  ', 'model': 'SFP-10/25GLR-31 ', 'ext_identifier': 'GBIC/SFP defined by two-wire interface ID', 'vendor_oui': '64-9d-99', 'cable_type': 'Length SMF (100m)', 'application_advertisement': 'N/A', 'ext_rateselect_compliance': 'Unknown', 'connector': 'LC', 'serial': 'C2407624540     ', 'cable_length': '100.0'}

Motivation and Context

Warnings should only be used to alert an administrator that something could cause issues. Typically warnings will be evaluated by an administrator as tagged by their SIEM, so it makes sense to reduce the workload by not incorrectly tagging these log messages.

Reduced the log level to NOTICE which will still appear at the default log levels in case anyone is parsing these events in their SIEM.

How Has This Been Tested?

Build as part of my private fork at https://github.com/bradh352/sonic-buildimage and loaded onto physical switches.

Additional Information (Optional)

Signed-off-by: Brad House (@bradh352)

@bradh352
Copy link
Author

@prgeor @rlhui

bradh352 added a commit to bradh352/sonic-platform-daemons that referenced this pull request Dec 24, 2024
Warnings should only be used to alert an administrator that something
could cause issues.  Typically warnings will be evaluated by an
administrator as tagged by their SIEM, so it makes sense to reduce the
workload by not incorrectly tagging these log messages.

Reduced the log level to NOTICE which will still appear at the default
log levels in case anyone is parsing these events in their SIEM.

Signed-off-by: Brad House (@bradh352)
bradh352 added a commit to bradh352/sonic-platform-daemons that referenced this pull request Dec 24, 2024
Warnings should only be used to alert an administrator that something
could cause issues.  Typically warnings will be evaluated by an
administrator as tagged by their SIEM, so it makes sense to reduce the
workload by not incorrectly tagging these log messages.

Reduced the log level to NOTICE which will still appear at the default
log levels in case anyone is parsing these events in their SIEM.

Signed-off-by: Brad House (@bradh352)
bradh352 added a commit to bradh352/sonic-platform-daemons that referenced this pull request Dec 24, 2024
Warnings should only be used to alert an administrator that something
could cause issues.  Typically warnings will be evaluated by an
administrator as tagged by their SIEM, so it makes sense to reduce the
workload by not incorrectly tagging these log messages.

Reduced the log level to NOTICE which will still appear at the default
log levels in case anyone is parsing these events in their SIEM.

Signed-off-by: Brad House (@bradh352)
bradh352 added a commit to bradh352/sonic-platform-daemons that referenced this pull request Dec 24, 2024
Warnings should only be used to alert an administrator that something
could cause issues.  Typically warnings will be evaluated by an
administrator as tagged by their SIEM, so it makes sense to reduce the
workload by not incorrectly tagging these log messages.

Reduced the log level to NOTICE which will still appear at the default
log levels in case anyone is parsing these events in their SIEM.

Signed-off-by: Brad House (@bradh352)
bradh352 added a commit to bradh352/sonic-platform-daemons that referenced this pull request Jan 2, 2025
Warnings should only be used to alert an administrator that something
could cause issues.  Typically warnings will be evaluated by an
administrator as tagged by their SIEM, so it makes sense to reduce the
workload by not incorrectly tagging these log messages.

Reduced the log level to NOTICE which will still appear at the default
log levels in case anyone is parsing these events in their SIEM.

Signed-off-by: Brad House (@bradh352)
bradh352 added a commit to bradh352/sonic-platform-daemons that referenced this pull request Jan 2, 2025
Warnings should only be used to alert an administrator that something
could cause issues.  Typically warnings will be evaluated by an
administrator as tagged by their SIEM, so it makes sense to reduce the
workload by not incorrectly tagging these log messages.

Reduced the log level to NOTICE which will still appear at the default
log levels in case anyone is parsing these events in their SIEM.

Signed-off-by: Brad House (@bradh352)
@bradh352
Copy link
Author

bradh352 commented Jan 9, 2025

@keboliu @prgeor @rlhui mind taking a quick look and possibly merge this? very minimal change

Warnings should only be used to alert an administrator that something
could cause issues.  Typically warnings will be evaluated by an
administrator as tagged by their SIEM, so it makes sense to reduce the
workload by not incorrectly tagging these log messages.

Reduced the log level to NOTICE which will still appear at the default
log levels in case anyone is parsing these events in their SIEM.

Signed-off-by: Brad House (@bradh352)
@bradh352 bradh352 force-pushed the xcvrd-silence-warnings branch from acbbef1 to 1c7c4ff Compare January 9, 2025 13:37
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bradh352
Copy link
Author

bradh352 commented Jan 9, 2025

I just rebased this to force a rebuild since semgrep hung back on Dec 1

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

4 participants