genieparser
genieparser copied to clipboard
Update show_alarm.py
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"
}
}
}