Skip to content

Commit af2d20c

Browse files
authored
Fix nxos interface by matching old FC stats (#2192)
1 parent 826e17e commit af2d20c

File tree

3 files changed

+159
-1
lines changed

3 files changed

+159
-1
lines changed

ntc_templates/templates/cisco_nxos_show_interface.textfsm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Start
9090
^\s+${RX_JUMBO_PACKETS}\s+jumbo\s+packets\s+\d+\s+storm\s+suppression\s+packets\s*$$
9191
^\s+${RX_JUMBO_PACKETS}\s+jumbo\s+pa(ckets)?\s+Encapsulation\s+\S+,\s+medium\s+is\s+\S+
9292
^\s+${RUNTS}\s+runts\s+${GIANTS}\s+giants\s+${CRC}\s+CRC(/FCS)?\s+${NO_BUFFER}\s+no\s+buffer\s*$$
93+
^\s+${CRC}\s+CRC,\s+\d+\s+unknown\s+class
9394
# TX
9495
^\s+${TX_JUMBO_PACKETS}\s+jumbo\s+packets\s*$$
9596
^\s+${OUTPUT_ERRORS}\s+output\s+errors?\s+${COLLISIONS}\s+collision\s+${DEFERRED}\s+deferred\s+${LATE_COLLISIONS}\s+late\s+collision\s*$$
@@ -102,7 +103,7 @@ Start
102103
^\s+(Beacon|EtherType|Rate\s+mode|Switchport\s+monitor)\s+is\s+
103104
^\s+Input\s+flow-control\s+is\s+\S+,\s+output\s+flow-control\s+is\s+\S+\s*$$
104105
^\s+EEE\s+\(efficient-ethernet\)\s+
105-
^\s+Last\s+clearing\s+of\s+"show\s+interface"\s+counters\s+
106+
^\s+[Ll]ast\s+clearing\s+of\s+"show\s+interface"\s+counters\s+
106107
^\s+\d+\s+interface\s+resets\s*$$
107108
^\s+Load-Interval\s+
108109
^\s+L3\s+((in|out)\s+)?Switched:\s*$$
@@ -130,4 +131,10 @@ Start
130131
^\s+Admin\s+port\s+mode
131132
^\s+snmp\s+link\s+state
132133
^\s+Current\s+counters\s+not\s+available
134+
^\s+Receive\s+data\s+field\s+[Ss]ize\s+is
135+
^\s+\d+\s+frames\s+(in|out)put,\s+\d+\s+bytes
136+
^\s+\d+\s+discards,\s+\d+\s+errors
137+
^\s+\d+\s+too\s+long,\s+\d+\s+too\s+short
138+
^\s+\d+\s+(in|out)put\s+OLS,\s+\d+\s+LRR,\s+\d+\s+NOS,\s+\d+\s+loop\s+inits
139+
^\s+Interface\s+last\s+changed
133140
^. -> Error
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
fc1/43 is down (SFP not present)
2+
Hardware is Fibre Channel
3+
Port WWN is 20:2b:54:7f:ee:64:66:80
4+
Admin port mode is auto, trunk mode is on
5+
snmp link state traps are enabled
6+
Port vsan is 1
7+
Receive data field Size is 2112
8+
Beacon is turned off
9+
1 minute input rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
10+
1 minute output rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
11+
0 frames input, 0 bytes
12+
0 discards, 0 errors
13+
0 CRC, 0 unknown class
14+
0 too long, 0 too short
15+
0 frames output, 0 bytes
16+
0 discards, 0 errors
17+
0 input OLS, 0 LRR, 0 NOS, 0 loop inits
18+
0 output OLS, 0 LRR, 0 NOS, 0 loop inits
19+
last clearing of "show interface" counters never
20+
21+
fc4/11 is down (Link failure: loss of signal)
22+
Port description is UCS Cisco Fiber-Channel (FI-B Port 31)
23+
Hardware is Fibre Channel, SFP is short wave laser w/o OFC (SN)
24+
Port WWN is 20:cb:00:2a:6a:73:4d:80
25+
Admin port mode is auto, trunk mode is on
26+
snmp link state traps are enabled
27+
Port vsan is 1
28+
Receive data field Size is 2112
29+
Beacon is turned off
30+
1 minute input rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
31+
1 minute output rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
32+
95020 frames input, 4941396 bytes
33+
0 discards, 0 errors
34+
0 CRC, 0 unknown class
35+
0 too long, 0 too short
36+
95026 frames output, 53208452 bytes
37+
0 discards, 0 errors
38+
1 input OLS, 1 LRR, 1 NOS, 0 loop inits
39+
1 output OLS, 0 LRR, 1 NOS, 0 loop inits
40+
last clearing of "show interface" counters never
41+
Interface last changed at Tue Jun 3 11:51:29 2025
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
parsed_sample:
3+
- admin_state: ""
4+
babble: ""
5+
bad_etype_drop: ""
6+
bad_proto_drop: ""
7+
bandwidth: ""
8+
bandwidth_input_rate: "0"
9+
bandwidth_output_rate: "0"
10+
bia: ""
11+
collisions: ""
12+
crc: "0"
13+
deferred: ""
14+
delay: ""
15+
description: ""
16+
dribble: ""
17+
duplex: ""
18+
encapsulation: ""
19+
giants: ""
20+
hardware_type: "Fibre Channel "
21+
ignored: ""
22+
input_discards: ""
23+
input_errors: ""
24+
input_packets: ""
25+
interface: "fc1/43"
26+
interface_down_drop: ""
27+
ip_address: ""
28+
last_link_flapped: ""
29+
late_collisions: ""
30+
link_status: "down (SFP not present)"
31+
lost_carrier: ""
32+
mac_address: ""
33+
media_type: ""
34+
mode: ""
35+
mtu: ""
36+
no_buffer: ""
37+
no_carrier: ""
38+
output_discards: ""
39+
output_errors: ""
40+
output_packets: ""
41+
overrun: ""
42+
packet_input_rate: ""
43+
packet_output_rate: ""
44+
prefix_length: ""
45+
runts: ""
46+
rx_jumbo_packets: ""
47+
rx_pause: ""
48+
short_frame: ""
49+
speed: ""
50+
stomped_crc: ""
51+
storm_suppression_bytes: ""
52+
tx_jumbo_packets: ""
53+
tx_pause: ""
54+
underrun: ""
55+
vlan_id: ""
56+
watchdog: ""
57+
- admin_state: ""
58+
babble: ""
59+
bad_etype_drop: ""
60+
bad_proto_drop: ""
61+
bandwidth: ""
62+
bandwidth_input_rate: "0"
63+
bandwidth_output_rate: "0"
64+
bia: ""
65+
collisions: ""
66+
crc: "0"
67+
deferred: ""
68+
delay: ""
69+
description: "UCS Cisco Fiber-Channel (FI-B Port 31)"
70+
dribble: ""
71+
duplex: ""
72+
encapsulation: ""
73+
giants: ""
74+
hardware_type: "Fibre Channel, SFP is short wave laser w/o OFC (SN)"
75+
ignored: ""
76+
input_discards: ""
77+
input_errors: ""
78+
input_packets: ""
79+
interface: "fc4/11"
80+
interface_down_drop: ""
81+
ip_address: ""
82+
last_link_flapped: ""
83+
late_collisions: ""
84+
link_status: "down (Link failure: loss of signal)"
85+
lost_carrier: ""
86+
mac_address: ""
87+
media_type: ""
88+
mode: ""
89+
mtu: ""
90+
no_buffer: ""
91+
no_carrier: ""
92+
output_discards: ""
93+
output_errors: ""
94+
output_packets: ""
95+
overrun: ""
96+
packet_input_rate: ""
97+
packet_output_rate: ""
98+
prefix_length: ""
99+
runts: ""
100+
rx_jumbo_packets: ""
101+
rx_pause: ""
102+
short_frame: ""
103+
speed: ""
104+
stomped_crc: ""
105+
storm_suppression_bytes: ""
106+
tx_jumbo_packets: ""
107+
tx_pause: ""
108+
underrun: ""
109+
vlan_id: ""
110+
watchdog: ""

0 commit comments

Comments
 (0)