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

Fortinet 'execute traceroute' template #1485

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ntc_templates/templates/fortinet_execute_traceroute.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Value DESTINATION_ADDRESS (\S+)
Value HOPS_MAX (\d+)
Value PACKETS_PER_HOP (\d+)
Value PACKET_SIZE (\d+)
Value HOP_NUM (\d+)
Value ADDRESS ((?!\*(?:\s+\*)*)\S+)
Value DETAILS (.*)

Start
^\s*traceroute\s+to\s+${DESTINATION_ADDRESS}\s+\(.*?\),\s+${HOPS_MAX}\s+hops\s+max,\s+${PACKETS_PER_HOP}\s+probe\s+packets\s+per\s+hop,\s+${PACKET_SIZE}\s+byte\s+packets\s*$$
^\s*${HOP_NUM}(?:\s+${ADDRESS})?\s+${DETAILS}\s*$$ -> Record
^\s*\*\s*$$
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ fortinet_execute_dhcp_lease-list.textfsm, .*, fortinet, exec[[ute]] dhcp lease-l
fortinet_get_system_ha_status.textfsm, .*, fortinet, g[[et]] sy[[stem]] ha s[[tatus]]
fortinet_get_system_interface.textfsm, .*, fortinet, g[[et]] sy[[stem]] in[[terface]]
fortinet_execute_log_display.textfsm, .*, fortinet, exec[[ute]] l[[og]] di[[splay]]
fortinet_execute_traceroute.textfsm, .*, fortinet, exec[[ute]] traceroute
fortinet_fnsysctl_ifconfig.textfsm, .*, fortinet, fnsysctl ifconfig
fortinet_get_system_status.textfsm, .*, fortinet, g[[et]] sy[[stem]] stat[[us]]
fortinet_diagnose_sys_top.textfsm, .*, fortinet, d[[iagnose]] sy[[s]] top
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
traceroute to 8.8.8.8 (8.8.8.8), 32 hops max, 10 probe packets per hop, 84 byte packets
1 1.2.3.4 0.454 ms 0.503 ms 0.262 ms 0.191 ms 0.187 ms 0.191 ms 0.191 ms 0.192 ms 0.193 ms 0.185 ms
2 5.6.7.8 1.225 ms * * *
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
parsed_sample:
- address: "1.2.3.4"
destination_address: "8.8.8.8"
details: "0.454 ms 0.503 ms 0.262 ms 0.191 ms 0.187 ms 0.191 ms 0.191 ms\
\ 0.192 ms 0.193 ms 0.185 ms"
hop_num: "1"
hops_max: "32"
packet_size: "84"
packets_per_hop: "10"
- address: "5.6.7.8"
destination_address: ""
details: "1.225 ms * * *"
hop_num: "2"
hops_max: ""
packet_size: ""
packets_per_hop: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
traceroute to 8.8.8.8 (8.8.8.8), 32 hops max, 3 probe packets per hop, 84 byte packets
1 1.2.3.4 0.423 ms 2.123 ms 0.274 ms
2 5.6.7.8 0.389 ms 0.445 ms 0.178 ms
3 * * *
4 * * *
5 * * *
6 8.8.8.8 15.494 ms 15.488 ms 15.469 ms
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
parsed_sample:
- address: "1.2.3.4"
destination_address: "8.8.8.8"
details: "0.423 ms 2.123 ms 0.274 ms"
hop_num: "1"
hops_max: "32"
packet_size: "84"
packets_per_hop: "3"
- address: "5.6.7.8"
destination_address: ""
details: "0.389 ms 0.445 ms 0.178 ms"
hop_num: "2"
hops_max: ""
packet_size: ""
packets_per_hop: ""
- address: ""
destination_address: ""
details: "* * *"
hop_num: "3"
hops_max: ""
packet_size: ""
packets_per_hop: ""
- address: ""
destination_address: ""
details: "* * *"
hop_num: "4"
hops_max: ""
packet_size: ""
packets_per_hop: ""
- address: ""
destination_address: ""
details: "* * *"
hop_num: "5"
hops_max: ""
packet_size: ""
packets_per_hop: ""
- address: "8.8.8.8"
destination_address: ""
details: "15.494 ms 15.488 ms 15.469 ms"
hop_num: "6"
hops_max: ""
packet_size: ""
packets_per_hop: ""
Loading