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

Event Management support #85

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

Conversation

spenugondaa
Copy link

Changes are done as part of Event and Alarm Framework described in HLD

The changes involve xml, actioner and renderer scripts to support various show/exec commands as described in the above HLD.

sonic# show event summary
Event summary
---------------------------------
Total:                         40000
Raised:                        14004
Acknowledged:                  7002
Cleared:                       14004
----------------------------------
sonic# show alarm summary
Alarm summary
---------------------------------
Total:                         0
Critical:                      0
Major:                         0
Minor:                         0
Warning:                       0
Acnowledged:                   0
----------------------------------
sonic# show event

----------------------------------------------------------------------------------------------------------------------------
Id           Action          Severity        Name                           Timestamp                   Description
----------------------------------------------------------------------------------------------------------------------------
2013         RAISE           WARNING         DUMMY_ALARM                    2021-06-07T04:21:55.256Z    RAISing for unit testing
2014         ACKNOWLEDGE     WARNING         DUMMY_ALARM                    2021-06-07T04:21:55.457Z    ACKNOWLEDGing for unit testing
2015         UNACKNOWLEDGE   WARNING         DUMMY_ALARM                    2021-06-07T04:21:55.658Z    UNACKNOWLEDGing for unit testing
2016         CLEAR           WARNING         DUMMY_ALARM                    2021-06-07T04:21:55.859Z    CLEARing for unit testing
2017         -               INFORMATIONAL   CUSTOM_EVPROFILE_CHANGE        2021-06-07T04:21:55.860Z    Raised for unit testing
2018         RAISE           WARNING         DUMMY_ALARM                    2021-06-07T04:21:56.620Z    Raised for unit testing
2019         CLEAR           WARNING         DUMMY_ALARM                    2021-06-07T04:21:56.263Z    Clearing for unit testing
2020         RAISE           WARNING         DUMMY_ALARM                    2021-06-07T04:21:56.464Z    Raised for unit testing
2021         CLEAR           WARNING         DUMMY_ALARM                    2021-06-07T04:21:56.665Z    Clearing for unit testing
2022         RAISE           WARNING         DUMMY_ALARM                    2021-06-07T04:21:56.867Z    RAISing for unit testing
2023         ACKNOWLEDGE     WARNING         DUMMY_ALARM                    2021-06-07T04:21:57.684Z    ACKNOWLEDGing for unit testing
2024         CLEAR           WARNING         DUMMY_ALARM                    2021-06-07T04:21:57.269Z    CLEARing for unit testing
2025         RAISE           WARNING         DUMMY_ALARM                    2021-06-07T04:21:57.269Z    RAISing for unit testing
2026         ACKNOWLEDGE     WARNING         DUMMY_ALARM                    2021-06-07T04:21:57.471Z    ACKNOWLEDGing for unit testing
2027         UNACKNOWLEDGE   WARNING         DUMMY_ALARM                    2021-06-07T04:21:57.672Z    UNACKNOWLEDGing for unit testing
2028         CLEAR           WARNING         DUMMY_ALARM                    2021-06-07T04:21:57.873Z    CLEARing for unit testing
2029         -               INFORMATIONAL   CUSTOM_EVPROFILE_CHANGE        2021-06-07T04:21:57.874Z    Raised for unit testing
2030         RAISE           WARNING         DUMMY_ALARM                    2021-06-07T04:21:58.756Z    Raised for unit testing
2031         CLEAR           WARNING         DUMMY_ALARM                    2021-06-07T04:21:58.276Z    Clearing for unit testing
2032         RAISE           WARNING         DUMMY_ALARM                    2021-06-07T04:21:58.477Z    Raised for unit testing
--more--qsonic# show event
  details   Detailed view of events
  from      Set start id
  id        Display event
  profile   Display active Event Profile
  recent    Event recent
  severity  Display all events with a given severity
  start     Set start time
  summary   Display event summary
  |         Pipe through a command
  <cr>

sonic# show alarm
  acknowledged  Display all alarms
  all           Display all alarms
  detail        Active alarm details
  from          Set start id
  id            Display alarm
  recent        Alarm recent
  severity      Display all alarms with a given severity
  start         Set start time
  summary       Display alarm summary
  |             Pipe through a command
  <cr>

sonic# event
  profile  Select an event profile as active

sonic# event profile default.json
sonic# alarm
  acknowledge    Acknowledge an active alarm
  unacknowledge  Unacknowledge an active alarm

sonic# 

Dependent PRs
sonic-buildimage
sonic-mgmt-common
sonic-swss-common

@lgtm-com
Copy link

lgtm-com bot commented Jun 8, 2021

This pull request introduces 6 alerts when merging 06ee93a into fd1a854 - view on LGTM.com

new alerts:

  • 4 for Unused import
  • 1 for Testing equality to None
  • 1 for Except block handles 'BaseException'

@tomek-US
Copy link

Please rebase and fix issues mentioned by the lgtm-com bot.

@ndas7
Copy link

ndas7 commented Dec 6, 2023

Is this PR obsolete, or does it need to be rebased as per the previous comment? Thanks.

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.

5 participants