I'm looking for some guidance as I'm not real strong in this area.
My imagined script would match a syslog entry and issue a 'clear xconnect interface vlan$' command in the cli.
The syslog entry would appear as follows: %XCONNECT-5-PW_STATUS: MPLS peer 10.1.1.1 vcid 48, VC state DOWN, PW Err
The 'vcid' in the log entry corresponds to the Vlan interface so in this case the script runs 'clear xconnect ineterface vlan48' from the CLI.
Here is the caveat...
Issuing this command at the CLI will cause the same messasge to be logged immediately following execution of the command. It will only happen once, but it will happen. The script would have to somehow ignore this or use a timer to know that it ignores it if it happens within x number of seconds from eachother.
Router#clear xconnect interface vlan 48 <-example of executed command
Jul 13 22:11:12.791: %XCONNECT-5-PW_STATUS: MPLS peer 10.1.1.1 vcid 48, VC state ADMIN DOWN
Jul 13 22:11:12.791: %XCONNECT-5-PW_STATUS: MPLS peer 10.1.1.1 vcid 48, VC state DOWN
Jul 13 22:11:12.795: %XCONNECT-5-PW_STATUS: MPLS peer 10.1.1.1 vcid 48, VC state DOWN, PW Err <-recurrance of matching syslog/result of CLI command which would cause script to continusously loop (i think)
Jul 13 22:11:12.795: %XCONNECT-5-PW_STATUS: MPLS peer 10.1.1.1 vcid 48, VC state ADMIN DOWN
Jul 13 22:11:12.795: %XCONNECT-5-PW_STATUS: MPLS peer 10.1.1.1 vcid 48, VC state DOWN, Loc AC Err
Jul 13 22:11:12.803: %LINK-3-UPDOWN: Interface Vlan48, changed state to down
Jul 13 22:11:12.803: %HSRP-5-STATECHANGE: Vlan48 Grp 48 state Active -> Init
Jul 13 22:11:12.807 MST: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan48, changed state to down
I think this is simply solved for somebody with a better knowledge than I on writing these scripts. Any guidance is greatly appreciated.
Thanks for your time in responding Joseph. You bring up an excellent question.
First, the platform is a Cisco 7600 series router and it is running IOS 15.2(2)S1.
Secondly, yes. Ultimately, the router is a point of aggregation for many attachement circuit terminations and the script would need to be able to operate and behave in such a way that it can react to many PWs going down simultaneously.
Another source I am working with brought up the idea of using [occursnum-occurrences] [periodperiod-value] from 'event syslog'.
Question We run asr9001 with XR 6.1.3, and we have a very long delay to
login w/ SSH 1 or 2 to the device compare to IOS device. After
investigation, the there is 1s delay between the client KEXDH_INIT and
the server (XR) KEXDH_REPLY. After debug ssh serv...
Introduction The purpose of this document is to demonstrate the Open
Shortest Path First (OSPF) behavior when the V-bit (Virtual-link bit) is
present in a non-backbone area. The V-bit is signaled in Type-1 LSA only
if the router is the endpoint of one or ...
Hi, I am seeing quite a few issues with patch install and wanted to
share my experience and workaround to this. Login to admin via CLI, then
access root with the “shell” command Issue “df –h” and you’ll probably
see the following directory full or nearly ...