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

Update show_alarm.py #892

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

Conversation

ZacharyPuls
Copy link

Update schema for ShowFacilityAlarmStatus - add syslog_string

Description

Update src/genie/libs/parser/iosxe/show_alarms.py, update ShowFacilityAlarmStatusSchema and ShowFacilityAlarmStatus, add new regex for column format on ASR920/IOS-XE 17.06.03:

KCBBASR31#show facility-alarm status
Source                     Time                   Severity      Syslog String                  Description [Index]
------                     ------                 --------      -------------                  -------------------
GigabitEthernet0           May 11 2023 02:55:45   INFO          ETHERNET_PORT_ADMIN_DOWN       Physical Port Administrative State Down [2]
xcvr container 0/0/6       May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
xcvr container 0/0/7       May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
GigabitEthernet0/0/8       May 11 2023 02:57:56   INFO          ETHERNET_PORT_ADMIN_DOWN       Physical Port Administrative State Down [2]
xcvr container 0/0/9       May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
GigabitEthernet0/0/11      May 11 2023 02:57:57   INFO          ETHERNET_PORT_ADMIN_DOWN       Physical Port Administrative State Down [2]
xcvr container 0/0/12      May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
xcvr container 0/0/13      May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
xcvr container 0/0/14      May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
xcvr container 0/0/15      May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
xcvr container 0/0/16      May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
GigabitEthernet0/0/17      May 11 2023 02:57:56   INFO          ETHERNET_PORT_ADMIN_DOWN       Physical Port Administrative State Down [2]
xcvr container 0/0/18      May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
xcvr container 0/0/19      May 11 2023 02:57:56   INFO          XCVR_MISSING                   Transceiver Missing [0]
GigabitEthernet0/0/20      May 11 2023 02:57:57   INFO          ETHERNET_PORT_ADMIN_DOWN       Physical Port Administrative State Down [2]
GigabitEthernet0/0/23      Jan 16 2024 08:51:32   INFO          ETHERNET_PORT_ADMIN_DOWN       Physical Port Administrative State Down [2]
TenGigabitEthernet0/0/26   May 11 2023 02:57:57   INFO          ETHERNET_PORT_ADMIN_DOWN       Physical Port Administrative State Down [2]
System Totals  Critical: 0  Major: 0  Minor: 0 Info: 17

Motivation and Context

Resolves #891

Screenshots:

Output of parser on production ASR920:

{
  "_exclude": [],
  "alarms": {
    "gigabitethernet0": {
      "description": "Physical Port Administrative State Down",
      "index": 2,
      "severity": "INFO",
      "syslog_string": "ETHERNET_PORT_ADMIN_DOWN",
      "time": "May 11 2023 02:55:45"
    },
    "gigabitethernet0/0/11": {
      "description": "Physical Port Administrative State Down",
      "index": 2,
      "severity": "INFO",
      "syslog_string": "ETHERNET_PORT_ADMIN_DOWN",
      "time": "May 11 2023 02:57:57"
    },
    "gigabitethernet0/0/17": {
      "description": "Physical Port Administrative State Down",
      "index": 2,
      "severity": "INFO",
      "syslog_string": "ETHERNET_PORT_ADMIN_DOWN",
      "time": "May 11 2023 02:57:56"
    },
    "gigabitethernet0/0/20": {
      "description": "Physical Port Administrative State Down",
      "index": 2,
      "severity": "INFO",
      "syslog_string": "ETHERNET_PORT_ADMIN_DOWN",
      "time": "May 11 2023 02:57:57"
    },
    "gigabitethernet0/0/23": {
      "description": "Physical Port Administrative State Down",
      "index": 2,
      "severity": "INFO",
      "syslog_string": "ETHERNET_PORT_ADMIN_DOWN",
      "time": "Jan 16 2024 08:51:32"
    },
    "gigabitethernet0/0/8": {
      "description": "Physical Port Administrative State Down",
      "index": 2,
      "severity": "INFO",
      "syslog_string": "ETHERNET_PORT_ADMIN_DOWN",
      "time": "May 11 2023 02:57:56"
    },
    "tengigabitethernet0/0/26": {
      "description": "Physical Port Administrative State Down",
      "index": 2,
      "severity": "INFO",
      "syslog_string": "ETHERNET_PORT_ADMIN_DOWN",
      "time": "May 11 2023 02:57:57"
    },
    "xcvr_container_0/0/12": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    },
    "xcvr_container_0/0/13": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    },
    "xcvr_container_0/0/14": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    },
    "xcvr_container_0/0/15": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    },
    "xcvr_container_0/0/16": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    },
    "xcvr_container_0/0/18": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    },
    "xcvr_container_0/0/19": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    },
    "xcvr_container_0/0/6": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    },
    "xcvr_container_0/0/7": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    },
    "xcvr_container_0/0/9": {
      "description": "Transceiver Missing",
      "index": 0,
      "severity": "INFO",
      "syslog_string": "XCVR_MISSING",
      "time": "May 11 2023 02:57:56"
    }
  }
}

Update schema for ShowFacilityAlarmStatus - add syslog_string
Copy link
Contributor

@omehrabi omehrabi 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 contributing
could you please add a test as well to the code

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.

ShowFacilityAlarmStatus - "show facility-alarm status" Parser Fails on ASR920 Running IOS-XE 17.06.03
3 participants