Replies: 1 comment
-
Hello @albadrius (If yes this is still an open item,) Would you be able to update your post with all of your "code" or "output" in code fences (which preserve whitespace)? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Team,
i am struggling with update cisco cisco_ios_show_interfaces.textfsm & cisco_xr_show_interfaces.textfsm templates with adding Last Link Flapped to parsing, would you please assist with it , and if there is any guidance can use for updating the templates
Value LINK_FLAPPED (\w+)
^\s+${LINK_FLAPPED}\s+[Ll]ast\s+[Ll]ink\s+[Ff]lapped\s+{LINK_FLAPPED}\s*$$
cisco_ios_show_interfaces.textfsm
Value Required INTERFACE (\S+)
Value LINK_STATUS (.+?)
Value PROTOCOL_STATUS (.+?)
Value HARDWARE_TYPE ([\w ]+)
Value ADDRESS ([a-fA-F0-9]{4}.[a-fA-F0-9]{4}.[a-fA-F0-9]{4})
Value BIA ([a-fA-F0-9]{4}.[a-fA-F0-9]{4}.[a-fA-F0-9]{4})
Value DESCRIPTION (.+?)
Value IP_ADDRESS (\d+.\d+.\d+.\d+/\d+)
Value MTU (\d+)
Value DUPLEX (([Ff]ull|[Aa]uto|[Hh]alf|[Aa]-).?)
Value SPEED (.?)
Value MEDIA_TYPE (\S+(\s+\S+)?)
Value BANDWIDTH (\d+\s+\w+)
Value DELAY (\d+\s+\S+)
Value ENCAPSULATION (.+?)
Value LAST_INPUT (.+?)
Value LAST_OUTPUT (.+?)
Value LAST_OUTPUT_HANG (.+?)
Value QUEUE_STRATEGY (.+)
Value INPUT_RATE (\d+)
Value OUTPUT_RATE (\d+)
Value INPUT_PACKETS (\d+)
Value OUTPUT_PACKETS (\d+)
Value INPUT_ERRORS (\d+)
Value CRC (\d+)
Value ABORT (\d+)
Value OUTPUT_ERRORS (\d+)
Value LINK_FLAPPED (\w+)
Start
^\S+\s+is\s+.+?,\s+line\s+protocol.$$ -> Continue.Record
^${INTERFACE}\s+is\s+${LINK_STATUS},\s+line\s+protocol\s+is\s+${PROTOCOL_STATUS}\s$$
^\s+Hardware\s+is\s+${HARDWARE_TYPE} -> Continue
^.+address\s+is\s+${ADDRESS}\s+(bia\s+${BIA})\s*$$
^\s+Description:\s+${DESCRIPTION}\s*$$
^\s+Internet\s+address\s+is\s+${IP_ADDRESS}\s*$$
^\s+MTU\s+${MTU}.BW\s+${BANDWIDTH}.DLY\s+${DELAY},\s$$
^\s+Encapsulation\s+${ENCAPSULATION},.+$$
^\s+Last\s+input\s+${LAST_INPUT},\s+output\s+${LAST_OUTPUT},\s+output\s+hang\s+${LAST_OUTPUT_HANG}\s$$
^\s+Queueing\s+strategy:\s+${QUEUE_STRATEGY}\s*$$
^\s+${DUPLEX},\s+${SPEED},.+media\stype\sis\s${MEDIA_TYPE}$$
^.input\s+rate\s+${INPUT_RATE}.+$$
^.output\s+rate\s+${OUTPUT_RATE}.+$$
^\s+${INPUT_PACKETS}\s+packets\s+input,\s+\d+\s+bytes,\s+\d+\s+no\s+buffer\s$$
^\s+${INPUT_ERRORS}\s+input\s+errors,\s+${CRC}\s+CRC,\s+\d+\s+frame,\s+\d+\s+overrun,\s+\d+\s+ignored\s$$
^\s+${INPUT_ERRORS}\s+input\s+errors,\s+${CRC}\s+CRC,\s+\d+\s+frame,\s+\d+\s+overrun,\s+\d+\s+ignored,\s+${ABORT}\s+abort\s*$$
^\s+${OUTPUT_PACKETS}\s+packets\s+output,\s+\d+\s+bytes,\s+\d+\s+underruns\s*$$
^\s+${OUTPUT_ERRORS}\s+output\s+errors,\s+\d+\s+collisions,\s+\d+\s+interface\s+resets\s*$$
^\s+${LINK_FLAPPED}\s+[Ll]ast\s+[Ll]ink\s+[Ff]lapped\s+{LINK_FLAPPED}\s*$$
Capture time-stamp if vty line has command time-stamping turned on
^Load\s+for\s+
^Time\s+source\s+is
Router Output Ex
FourHundredGigE0/4/0/23 is up, line protocol is up
Interface state transitions: 39
Dampening enabled: penalty 0, not suppressed
half-life: 5 reuse: 1000
suppress: 2000 max-suppress-time: 20
restart-penalty: 0
Hardware is FourHundredGigE, address is b368.1481.412c (bia b402.1631.429c)
Description: Testckt_AAV
Internet address is Unknown
MTU 1500 bytes, BW 400000000 Kbit (Max: 400000000 Kbit)
reliability 255/255, txload 33/255, rxload 6/255
Encapsulation ARPA,
Full-duplex, 400000Mb/s, 400GBASE-FR4, link type is force-up
output flow control is off, input flow control is off
Carrier delay (up) is 10 msec
loopback not set,
Last link flapped 2w3d
Last input 00:00:00, output 00:00:00
Last clearing of "show interface" counters 15w1d
30 second input rate 9694905000 bits/sec, 2303525 packets/sec
30 second output rate 52100411000 bits/sec, 5856909 packets/sec
11231804468431 packets input, 6174346737907636 bytes, 0 total input drops
0 drops for unrecognized upper-level protocol
Received 2 broadcast packets, 100622430 multicast packets
0 runts, 0 giants, 0 throttles, 0 parity
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
20033304661016 packets output, 20951130076401259 bytes, 0 total output drops
Output 3 broadcast packets, 93256553 multicast packets
0 output errors, 0 underruns, 0 applique, 0 resets
0 output buffer failures, 0 output buffers swapped out
8 carrier transitions
Beta Was this translation helpful? Give feedback.
All reactions