Skip to content

Commit

Permalink
fix: Mikrotik ip arp print without-paging (#1882)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurGUYON authored Oct 17, 2024
1 parent b51f62a commit 70ee76b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ Value FLAGS ([XIHDPC]+)
Value IP_ADDRESS (\S+)
Value MAC_ADDRESS (([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2}))
Value INTERFACE (\S+)
Value STATUS (\S+)

Start
^\s*#\s*ADDRESS\s*MAC-ADDRESS\s*INTERFACE\s*$$ -> EntriesTable
^\s*#\s*ADDRESS\s*MAC-ADDRESS\s*INTERFACE\s*(STATUS)?\s*$$ -> EntriesTable

EntriesTable
^\s*${INDEX}\s*(${FLAGS})?\s*${IP_ADDRESS}\s*(${MAC_ADDRESS})?\s+(${INTERFACE})?\s*$$ -> Record
^\s*${INDEX}\s*(${FLAGS})?\s*${IP_ADDRESS}\s*(${MAC_ADDRESS})?\s+(${INTERFACE})?\s*(${STATUS})?\s*$$ -> Record
^\s*(?:\d{2}:){2}\d{2}\s+echo:\s*.*$$ -> Next
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ parsed_sample:
interface: "dmz-1-vlan"
ip_address: "185.163.212.158"
mac_address: ""
status: ""
- flags: ""
index: "1"
interface: "vlan-2"
ip_address: "185.163.212.159"
mac_address: "AF:D6:C8:F2:36:16"
status: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Flags: D - DYNAMIC; C - COMPLETE
Columns: ADDRESS, MAC-ADDRESS, INTERFACE, STATUS
# ADDRESS MAC-ADDRESS INTERFACE STATUS
0 DC 192.168.1.10 50:50:40:40:2E:C1 bridge-lan stale
17:20:06 echo: system,error,critical login failure for user admin from 80.100.100.11 via ssh
1 D 192.168.1.11 C7:50:40:40:2A:C1 bridge-lan reachable
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- flags: "DC"
index: "0"
ip_address: "192.168.1.10"
mac_address: "50:50:40:40:2E:C1"
interface: "bridge-lan"
status: "stale"
- flags: "D"
index: "1"
ip_address: "192.168.1.11"
mac_address: "C7:50:40:40:2A:C1"
interface: "bridge-lan"
status: "reachable"

0 comments on commit 70ee76b

Please sign in to comment.