-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Fortinet exec ping template (#1480)
Co-authored-by: pskliarenko <“[email protected]”>
- Loading branch information
1 parent
2f09a14
commit 355b09a
Showing
6 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Value List SENT_PACKET_SIZE (\d+) | ||
Value List SENT_PACKET_ADDRESS (\S+) | ||
Value List SENT_PACKET_ICMP_SEQ (\d+) | ||
Value List SENT_PACKET_TTL (\d+) | ||
Value List SENT_PACKET_TIME (\d+(?:\.\d+)?) | ||
Value ADDRESS (\S+) | ||
Value TRANSMITTED (\d+) | ||
Value RECEIVED (\d+) | ||
Value PACKET_LOSS (\d+) | ||
Value MIN_RTT (\d+(?:\.\d+)?) | ||
Value AVG_RTT (\d+(?:\.\d+)?) | ||
Value MAX_RTT (\d+(?:\.\d+)?) | ||
|
||
Start | ||
^\s*PING.*\s*$$ | ||
^\s*${SENT_PACKET_SIZE}\s+bytes\s+from\s+${SENT_PACKET_ADDRESS}:\s+icmp_seq=${SENT_PACKET_ICMP_SEQ}\s+ttl=${SENT_PACKET_TTL}\s+time=${SENT_PACKET_TIME}\s+.*$$ | ||
^\s*---\s+${ADDRESS}\s+ping\s+statistics\s+---\s*$$ | ||
^\s*${TRANSMITTED}\s+packets\s+transmitted\,\s+${RECEIVED}\s+packets\s+received\,\s+${PACKET_LOSS}\%\s+packet\s+loss\s*$$ | ||
^\s*round-trip\s+min/avg/max\s+=\s+${MIN_RTT}/${AVG_RTT}/${MAX_RTT}\s+ms\s*$$ | ||
^\s*$$ | ||
^. -> Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PING 8.8.8.8 (8.8.8.8): 56 data bytes | ||
64 bytes from 8.8.8.8: icmp_seq=0 ttl=110 time=25.9 ms | ||
64 bytes from 8.8.8.8: icmp_seq=1 ttl=110 time=25.8 ms | ||
64 bytes from 8.8.8.8: icmp_seq=2 ttl=110 time=25.8 ms | ||
64 bytes from 8.8.8.8: icmp_seq=3 ttl=110 time=25.8 ms | ||
64 bytes from 8.8.8.8: icmp_seq=4 ttl=110 time=25.8 ms | ||
|
||
--- 8.8.8.8 ping statistics --- | ||
5 packets transmitted, 5 packets received, 0% packet loss | ||
round-trip min/avg/max = 25.8/25.8/25.9 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
parsed_sample: | ||
- address: "8.8.8.8" | ||
avg_rtt: "25.8" | ||
max_rtt: "25.9" | ||
min_rtt: "25.8" | ||
packet_loss: "0" | ||
received: "5" | ||
sent_packet_address: | ||
- "8.8.8.8" | ||
- "8.8.8.8" | ||
- "8.8.8.8" | ||
- "8.8.8.8" | ||
- "8.8.8.8" | ||
sent_packet_icmp_seq: | ||
- "0" | ||
- "1" | ||
- "2" | ||
- "3" | ||
- "4" | ||
sent_packet_size: | ||
- "64" | ||
- "64" | ||
- "64" | ||
- "64" | ||
- "64" | ||
sent_packet_time: | ||
- "25.9" | ||
- "25.8" | ||
- "25.8" | ||
- "25.8" | ||
- "25.8" | ||
sent_packet_ttl: | ||
- "110" | ||
- "110" | ||
- "110" | ||
- "110" | ||
- "110" | ||
transmitted: "5" |
4 changes: 4 additions & 0 deletions
4
tests/fortinet/execute_ping/fortinet_execute_ping_unreachable.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PING 8.87.8.8 (8.87.8.8): 56 data bytes | ||
|
||
--- 8.87.8.8 ping statistics --- | ||
5 packets transmitted, 0 packets received, 100% packet loss |
14 changes: 14 additions & 0 deletions
14
tests/fortinet/execute_ping/fortinet_execute_ping_unreachable.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
parsed_sample: | ||
- address: "8.87.8.8" | ||
avg_rtt: "" | ||
max_rtt: "" | ||
min_rtt: "" | ||
packet_loss: "100" | ||
received: "0" | ||
sent_packet_address: [] | ||
sent_packet_icmp_seq: [] | ||
sent_packet_size: [] | ||
sent_packet_time: [] | ||
sent_packet_ttl: [] | ||
transmitted: "5" |