From fef69390f24332ad80b664cddfdcea95f77c4aa4 Mon Sep 17 00:00:00 2001 From: lscarmic Date: Sat, 23 Feb 2019 08:59:09 -0500 Subject: [PATCH] IOS SHOW IP FLOW TOPTALKERS: Add new template (#373) --- ...cisco_ios_show_ip_flow_toptalkers.template | 11 ++++++++++ templates/index | 3 ++- .../cisco_ios_show_ip_flow_toptalkers.parsed | 20 +++++++++++++++++++ .../cisco_ios_show_ip_flow_toptalkers.raw | 3 +++ 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 templates/cisco_ios_show_ip_flow_toptalkers.template create mode 100755 tests/cisco_ios/show_ip_flow_toptalkers/cisco_ios_show_ip_flow_toptalkers.parsed create mode 100755 tests/cisco_ios/show_ip_flow_toptalkers/cisco_ios_show_ip_flow_toptalkers.raw diff --git a/templates/cisco_ios_show_ip_flow_toptalkers.template b/templates/cisco_ios_show_ip_flow_toptalkers.template new file mode 100755 index 0000000000..79ef088808 --- /dev/null +++ b/templates/cisco_ios_show_ip_flow_toptalkers.template @@ -0,0 +1,11 @@ +Value SRC_INTF (\S+) +Value SRC_IPADDR ([0-9A-Fa-f:\.]+) +Value SRC_PORT ([A-Z0-9]+) +Value DST_INTF (\S+) +Value DST_IPADDR ([0-9A-Fa-f:\.]+) +Value PROTO ([A-Z0-9]+) +Value DST_PORT ([A-Z0-9]+) +Value PKT ([0-9]+) + +Start + ^${SRC_INTF}\s+${SRC_IPADDR}\s+${DST_INTF}\s+${DST_IPADDR}\s+${PROTO}\s+${SRC_PORT}\s+${DST_PORT}\s+${PKT} -> Record \ No newline at end of file diff --git a/templates/index b/templates/index index 5424313cde..1391d9f9db 100644 --- a/templates/index +++ b/templates/index @@ -91,7 +91,7 @@ brocade_netiron_show_span.template, .*, brocade_netiron, sh[[ow]] sp[[anning-tre brocade_netiron_show_topo.template, .*, brocade_netiron, sh[[ow]] to[[pology-group]] checkpoint_gaia_show_interfaces_all.template, .*, checkpoint_gaia, show interfaces all -checkpoint_gaia_show_ntp_servers.template, .*, checkpoint_gaia, show ntp servers +checkpoint_gaia_show_ntp_servers.template, .*, checkpoint_gaia, show ntp servers checkpoint_gaia_show_version_all.template, .*, checkpoint_gaia, show version all checkpoint_gaia_show_domainname.template, .*, checkpoint_gaia, show domainname checkpoint_gaia_show_ipv6_route.template, .*, checkpoint_gaia, show ipv6 route @@ -139,6 +139,7 @@ cisco_ios_show_lldp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] lld[[p]] cisco_ios_show_cdp_neighbors_detail.template, .*, cisco_ios, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] cisco_ios_show_ipv6_interface_brief.template, .*, cisco_ios, sh[[ow]] ipv[[6]] i[[nterface]] b[[rief]] cisco_ios_show_ip_eigrp_neighbors.template, .*, cisco_ios, sh[[ow]] ip ei[[grp]] nei[[ghbors]] +cisco_ios_show_ip_flow_toptalkers.template, .*, cisco_ios, sh[[ow]] ip fl[[ow]] top[[-talkers]] cisco_ios_show_ip_interface_brief.template, .*, cisco_ios, sh[[ow]] ip int[[erface]] br[[ief]] cisco_ios_show_interfaces_status.template, .*, cisco_ios, sh[[ow]] int[[erfaces]] st[[atus]] cisco_ios_show_ip_eigrp_topology.template, .*, cisco_ios, sh[[ow]] ip eigrp top[[ology]] diff --git a/tests/cisco_ios/show_ip_flow_toptalkers/cisco_ios_show_ip_flow_toptalkers.parsed b/tests/cisco_ios/show_ip_flow_toptalkers/cisco_ios_show_ip_flow_toptalkers.parsed new file mode 100755 index 0000000000..cfe1563670 --- /dev/null +++ b/tests/cisco_ios/show_ip_flow_toptalkers/cisco_ios_show_ip_flow_toptalkers.parsed @@ -0,0 +1,20 @@ +--- +parsed_sample: + +- src_port: '07C1' + pkt: '414' + proto: '11' + src_intf: 'Gi0/2/0.30' + dst_intf: 'Null' + src_ipaddr: '10.2.100.83' + dst_port: '07C1' + dst_ipaddr: '224.0.0.2' + +- src_port: '07C1' + pkt: '410' + proto: '11' + src_intf: 'Gi0/2/0.40' + dst_intf: 'Null' + src_ipaddr: '10.2.100.99' + dst_port: '07C1' + dst_ipaddr: '224.0.0.2' diff --git a/tests/cisco_ios/show_ip_flow_toptalkers/cisco_ios_show_ip_flow_toptalkers.raw b/tests/cisco_ios/show_ip_flow_toptalkers/cisco_ios_show_ip_flow_toptalkers.raw new file mode 100755 index 0000000000..dfc6048e84 --- /dev/null +++ b/tests/cisco_ios/show_ip_flow_toptalkers/cisco_ios_show_ip_flow_toptalkers.raw @@ -0,0 +1,3 @@ +SrcIf SrcIPaddress DstIf DstIPaddress Pr SrcP DstP Pkts +Gi0/2/0.30 10.2.100.83 Null 224.0.0.2 11 07C1 07C1 414 +Gi0/2/0.40 10.2.100.99 Null 224.0.0.2 11 07C1 07C1 410