Skip to content

Commit

Permalink
New template: Vyatta/VyOS BGP summary (#828)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede authored Nov 30, 2020
1 parent 84e220b commit f2cc1c8
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ ubiquiti_edgeswitch_show_arp.textfsm, .*, ubiquiti_edgeswitch, sh[[ow]] ar[[p]]
vmware_nsxv_show_ip_bgp_neighbors.textfsm, .*, vmware_nsxv, sh[[ow]] ip b[[gp]] n[[eighbors]]
vmware_nsxv_show_ip_route.textfsm, .*, vmware_nsxv, sh[[ow]] ip r[[oute]]

vyatta_vyos_show_ip_bgp_summary.textfsm, .*, .*vyos.*, sh[[ow]] ip bgp sum[[mary]]
vyatta_vyos_show_interfaces.textfsm, .*, .*vyos.*, sh[[ow]] int[[erfaces]]
vyatta_vyos_show_arp.textfsm, .*, .*vyos.*, sh[[ow]] a[[rp]]

Expand Down
23 changes: 23 additions & 0 deletions templates/vyatta_vyos_show_ip_bgp_summary.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Value Filldown ROUTER_ID (\S+)
Value Filldown LOCAL_AS (\d+)
Value BGP_NEIGH (\d+?\.\d+?\.\d+?\.\d+?)
Value NEIGH_AS (\d+)
Value MSG_RCVD (\d+)
Value MSG_SENT (\d+)
Value UP_DOWN (\S+?)
Value STATE_PFXRCD (\S+?\s+\S+?|\S+?)

Start
^IPv4\s+Unicast\s+Summary:$$
^BGP\s+router\s+identifier\s+${ROUTER_ID},\s+[Ll]ocal\s+[Aa][Ss]\s+number\s+${LOCAL_AS}\s+vrf-id\s+\d+$$
^BGP\s+table\s+version\s+\d+$$
^RIB\s+entries\s+\d+,\s+using\s+\d+\s+MiB\s+of\s+memory$$
^Peers\s+\d+,\s+using\s+\d+\s+KiB\s+of\s+memory$$
^Peer\s+groups\s+\d+,\s+using\s+\d+\s+bytes\s+of\s+memory$$
^Neighbor\s+V\s+AS\s+MsgRcvd\s+MsgSent\s+TblVer\s+InQ\s+OutQ\s+Up/Down\s+State/PfxRcd$$
^${BGP_NEIGH}\s+\S+\s+${NEIGH_AS}\s+${MSG_RCVD}\s+${MSG_SENT}(\s+\d+?){3}\s+${UP_DOWN}\s+${STATE_PFXRCD}\s*$$ -> Record
^Total\s+number\s+of\s+neighbors\s+\d+$$
^\s*$$
^. -> Error

EOF
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
IPv4 Unicast Summary:
BGP router identifier 10.10.10.1, local AS number 123456 vrf-id 0
BGP table version 50711224
RIB entries 1537189, using 270 MiB of memory
Peers 3, using 593 KiB of memory
Peer groups 4, using 256 bytes of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.10.10 4 1234 71460 69353 0 0 0 5d13h10m 0
123.123.123.123 4 345612 450590 34688 0 0 0 1d00h18m 0
193.189.82.105 4 12365 0 0 0 0 0 never Active

Total number of neighbors 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
parsed_sample:
- router_id: "10.10.10.1"
local_as: "123456"
bgp_neigh: "10.10.10.10"
neigh_as: "1234"
msg_rcvd: "71460"
msg_sent: "69353"
up_down: "5d13h10m"
state_pfxrcd: "0"
- router_id: "10.10.10.1"
local_as: "123456"
bgp_neigh: "123.123.123.123"
neigh_as: "345612"
msg_rcvd: "450590"
msg_sent: "34688"
up_down: "1d00h18m"
state_pfxrcd: "0"
- router_id: "10.10.10.1"
local_as: "123456"
bgp_neigh: "193.189.82.105"
neigh_as: "12365"
msg_rcvd: "0"
msg_sent: "0"
up_down: "never"
state_pfxrcd: "Active"

0 comments on commit f2cc1c8

Please sign in to comment.