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

CISCO XR SHOW BGP NEIGH: Add new template #341

Merged
merged 11 commits into from
Jan 24, 2019
144 changes: 144 additions & 0 deletions templates/cisco_xr_show_bgp_neighbors.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
Value NEIGHBOR (\S+)
Value REMOTE_AS (\d+)
Value LOCAL_AS (\d+)
Value TYPE (\w+)
Value DESCRIPTION (.+?)
Value REMOTE_ROUTER_ID (\S+)
Value CLUSTER_ID (\S+)
Value STATE (.+?)
Value UPTIME (.+?)
Value NSR_STATE (.+?)
Value HOLDTIME (\d+)
Value KEEPALIVE (\d+)
Value NSR (.+?)
Value GR (.+?)
Value List AFI (.+?)
Value List VERSION (\d+)
Value List ROUTE_REFLECTOR_ROLE (\S+)
Value List POLICY_INCOMING (\S+)
Value List POLICY_OUTGOING (\S+)
Value List PREFIXES_IN (\d+)
Value List PREFIXES_IN_BEST (\d+)
Value List PREFIXES_OUT (\d+)
Value List PREFIXES_OUT_SUPPRESSED (\d+)
Value List PREFIXES_OUT_WITHDRAWN (\d+)
Value List MAX_PREFIXES (\d+)
Value List MAX_PREFIXES_WARN_PERCENT (\d+)
Value List DEFAULT_ORIGINATE (.+?)
Value List LAST_ACK_VERSION (\d+)
Value List LAST_SYNCED_ACK_VERSION (\d+)
Value CONNECTIONS_ESTABLISHED (\d+)
Value CONNECTIONS_DROPPED (\d+)
Value LOCAL_ADDRESS (.*)
Value LOCAL_PORT (\d+)
Value REMOTE_ADDRESS (.*)
Value REMOTE_PORT (\d+)
Value LAST_RESET (.+?)
Value LAST_RESET_REASON (.+?)
Value LAST_NOTIFICATION_SENT (\S+)
Value ERROR_CODE (.+?)
Value LAST_NOTIFICATION_RECEIVED (\S+)
Value PEER_ERROR_CODE (.+?)
Value PEER_RESET_REASON (.+?)
Value MAX_HOPS (\d+)


Start
^\S+\s+\S+\s+\d+\s+\d+:\d+:\d+\.\d+\s+\S+\s*$$
^BGP\s+neighbor -> Continue.Record
^BGP\s+neighbor\s+is\s+${NEIGHBOR}\s*$$
^\s+Remote\s+AS\s+${REMOTE_AS}\,\s+local\s+AS\s+${LOCAL_AS}\,\s+(?:no\-prepend,\s+)?(?:replace\-as\,\s+)?${TYPE}\s+link
^\s+Administratively\s+shut\s+down
^\s+Description:\s+${DESCRIPTION}\s*$$
^\s+Remote\s+router\s+ID\s+${REMOTE_ROUTER_ID}
^\s+Cluster\s+ID\s+${CLUSTER_ID}\s*$$
^\s+BGP\s+[Ss]tate\s+=\s+${STATE}(?:,\s+up\s+for\s+${UPTIME})?\s*$$
^\s+NSR\s+[Ss]tate:\s+(?:NSR\s+)?${NSR_STATE}\s*$$
^\s+BFD\s+[Ee]nabled
^\s+Last\s+[Rr]ead
^\s+Hold\s+time\s+is\s+${HOLDTIME},\s+keepalive\s+interval\s+is\s+${KEEPALIVE}
^\s+Configured hold time\:\s+\d+\,\s+keepalive\:
^\s+(?:Second\s+)?[Ll]ast\s+write
^\s+Socket\s+(?:not\s+)?armed
^\s+Last\s+KA
^\s+Precedence:
^\s+Non-stop\s+routing\s+is\s+${NSR}\s*$$
^\s+Graceful\s+restart\s+is\s+${GR}\s*$$
^\s+Restart\s+time\s+is
^\s+Stale\s+path\s+timeout\s+time\s+is
^\s+Enforcing\s+first\s+AS
^\s+Multi-protocol\s+capability
^\s+Neighbor\s+capabilities:
^\s+Graceful\s+Restart\s+\(GR\s+Awareness\)\:
^\s+Route\s+refresh:
^\s+4-byte\s+AS:
^\s+Address\s+family
^\s+Received\s+\d+\s+
^\s+Sent\s+\d+\s+messages
^\s+Inbound\s+message\s+logging
^\s+Outbound\s+message\s+logging
^\s+Minimum\s+time\s+between\s+advertisement
^\s+For\s+Address\s+Family:\s+${AFI}\s*$$ -> AFI
^\s+Connections\s+established\s+${CONNECTIONS_ESTABLISHED};\s+dropped\s+${CONNECTIONS_DROPPED}\s*$$ -> Connection
^\s*$$
^. -> Error

AFI
^\s+For\s+Address\s+Family:\s+${AFI}\s*$$
^\s+BGP\s+neighbor\s+version\s+${VERSION}\s*$$
^\s+Update\s+group:
^\s+Route-Reflector\s+${ROUTE_REFLECTOR_ROLE}\s*$$
^\s+Default\s+information\s+originate\:\s+${DEFAULT_ORIGINATE}\s*$$
^\s+AF-dependent capabilities
^\s+Graceful\s+Restart\s+capability
^\s+Local\s+restart\s+time\s+is
^\s+Maximum\s+stalepath\s+time\s+is
^\s+Remote\s+Restart\s+time\s+is
^\s+NEXT_HOP
^\s+Route\s+refresh\s+request:
^\s+Policy\s+for\s+incoming\s+advertisements\s+is\s+${POLICY_INCOMING}\s*$$
^\s+Policy\s+for\s+outgoing\s+advertisements\s+is\s+${POLICY_OUTGOING}\s*$$
^\s+${PREFIXES_IN}\s+accepted\s+prefixes,\s+${PREFIXES_IN_BEST}\s+are\s+bestpaths
^\s+Cumulative\s+no\.\s+of\s+prefixes\s+denied:
^\s+No\s+policy:
^\s+By\s+ORF\s+policy:
^\s+Prefix\s+advertised\s+${PREFIXES_OUT},\s+suppressed\s+${PREFIXES_OUT_SUPPRESSED},\s+withdrawn\s+${PREFIXES_OUT_WITHDRAWN}
^\s+Maximum\s+prefixes\s+allowed\s+${MAX_PREFIXES}
^\s+Threshold\s+for\s+warning\s+message\s+${MAX_PREFIXES_WARN_PERCENT}
^\s+AIGP
^\s+An\s+EoR
^\s+Private\s+AS\s+number\s+removed
^\s+Community\s+attribute
^\s+Advertise\s+VPNv[46]\s+routes\s+(is\s)?enabled\s+with
^\s+Last\s+ack\s+version\s+${LAST_ACK_VERSION},\s+Last\s+synced\s+ack\s+version\s+${LAST_SYNCED_ACK_VERSION}
^\s+Outstanding\s+version\s+objects:
^\s+Additional-paths\s+operation:
^\s+AS\s+[oO]verride\s+is
^\s+Send\s+Multicast\s+Attributes
^\s+Connections\s+established\s+${CONNECTIONS_ESTABLISHED};\s+dropped\s+${CONNECTIONS_DROPPED}\s*$$ -> Connection
^BGP\s+neighbor -> Continue.Record
^BGP\s+neighbor\s+is\s+${NEIGHBOR}\s*$$ -> Start
^\s*$$
^. -> Error

Connection
^\s+Local\s+host\:\s+${LOCAL_ADDRESS}\,\s+Local\s+port\:\s+${LOCAL_PORT}
^\s+Foreign\s+host\:\s+${REMOTE_ADDRESS}\,\s+Foreign\s+port\:\s+${REMOTE_PORT}
^\s+Last\s+reset\s+${LAST_RESET}(?:\,\s+due\s+to\s+${LAST_RESET_REASON})?\s*$$
^\s+External\s+BGP\s+neighbor\s+not\s+directly
^\s+Time\s+since\s+last\s+notification\s+sent\s+to\s+neighbor:\s+${LAST_NOTIFICATION_SENT}
^\s+Error\s+Code:\s+${ERROR_CODE}\s*$$
^\s+Notification\s+data\s+(?:sent|received):
^\s+(?:[0-9A-F]{8}|None)\s*$$
^\s+Time\s+since\s+last\s+notification\s+received\s+from\s+neighbor:\s+${LAST_NOTIFICATION_RECEIVED} -> PeerError
^\s+Peer\s+reset\s+reason:\s+${PEER_RESET_REASON}\s*$$
^\s+.+up\s+to\s+${MAX_HOPS}\s+hops\s+away
^BGP\s+neighbor -> Continue.Record
^BGP\s+neighbor\s+is\s+${NEIGHBOR}\s*$$ -> Start
^\s+For\s+Address\s+Family:\s+${AFI}\s*$$ -> AFI
^\s*$$
^. -> Error

PeerError
^\s+Error\s+Code:\s+${PEER_ERROR_CODE}\s*$$ -> Connection
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ cisco_xr_show_ip_bgp_summary.template, .*, cisco_xr, sh[[ow]] ip b[[gp]] s[[umma
cisco_xr_show_isis_neighbors.template, .*, cisco_xr, sh[[ow]] isis ne[[ighbors]]
cisco_xr_show_lldp_neighbors.template, .*, cisco_xr, sh[[ow]] lld[[p]] neig[[hbors]]
cisco_xr_show_rsvp_neighbors.template, .*, cisco_xr, sh[[ow]] rs[[vp]] neigh[[bors]]
cisco_xr_show_bgp_neighbors.template, .*, cisco_xr, sh[[ow]] bg[[p]] nei[[ghbors]]
cisco_xr_show_ospf_neighbor.template, .*, cisco_xr, sh[[ow]] ospf nei[[ghbor]]
cisco_xr_show_processes_cpu.template, .*, cisco_xr, sh[[ow]] proc[[esses]] c[[pu]]
cisco_xr_show_bfd_sessions.template, .*, cisco_xr, sh[[ow]] bf[[d]] sess[[ions]]
Expand Down
Loading