-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MikroTik ip dhcp-server lease print terse without-paging template (…
…#1500) Co-authored-by: pskliarenko <“[email protected]”>
- Loading branch information
1 parent
59f39f7
commit 605fa01
Showing
6 changed files
with
129 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
24 changes: 24 additions & 0 deletions
24
...lates/templates/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.textfsm
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,24 @@ | ||
Value INDEX (\d+) | ||
Value FLAG ([XRDB]+) | ||
Value COMMENT (.*) | ||
Value ADDRESS (\S+) | ||
Value MAC_ADDRESS ((?:[0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}) | ||
Value CLIENT_ID (\S+) | ||
Value ADDRESS_LISTS (\S+) | ||
Value SERVER (\S+) | ||
Value ALWAYS_BROADCAST (yes|no) | ||
Value DHCP_OPTION (\S+) | ||
Value STATUS (\S+) | ||
Value EXPIRES_AFTER (\S+) | ||
Value LAST_SEEN (\S+) | ||
Value ACTIVE_ADDRESS (\S+) | ||
Value ACTIVE_MAC_ADDRESS ((?:[0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}) | ||
Value ACTIVE_CLIENT_ID (\S+) | ||
Value ACTIVE_SERVER (\S+) | ||
Value HOST_NAME (\S+) | ||
Value SRC_MAC_ADDRESS ((?:[0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}) | ||
|
||
Start | ||
^\s*${INDEX}(?:\s+${FLAG})?(?:\s+comment=${COMMENT})?\s+address=${ADDRESS}(?:\s+mac-address=${MAC_ADDRESS})?(?:\s+client-id=(?:\"?(\b${CLIENT_ID}\b)?\"?))?(?:\s+address-lists=(?:\"?(\b${ADDRESS_LISTS}\b)?\"?))?(?:\s+server=${SERVER})?(?:\s+dhcp-option=(?:\"?(\b${DHCP_OPTION}\b)?\"?))?(?:\s+status=${STATUS})?(?:\s+expires-after=${EXPIRES_AFTER})?(?:\s+last-seen=${LAST_SEEN})?(?:\s+active-address=${ACTIVE_ADDRESS})?(?:\s+active-mac-address=${ACTIVE_MAC_ADDRESS})?(?:\s+active-client-id=(?:\"?(\b${ACTIVE_CLIENT_ID}\b)?\"?))?(?:\s+active-server=${ACTIVE_SERVER})?(?:\s+host-name=(?:\"?(\b${HOST_NAME}\b)?\"?))?(?:\s+src-mac-address=${SRC_MAC_ADDRESS})?\s*$$ -> Record | ||
^\s*$$ | ||
^. -> Error |
2 changes: 2 additions & 0 deletions
2
...erse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.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,2 @@ | ||
0 D address=192.168.69.254 address-lists="" server=*1 dhcp-option="" status=conflict expires-after=6m59s last-seen=35w12h24m42s active-address=192.168.69.254 active-server=*1 src-mac-address=12:34:56:78:90:AB | ||
1 address=172.16.16.120 mac-address=30:07:4D:F5:07:49 client-id="1:30:7:4d:f5:7:49" address-lists="" server=defconf dhcp-option="" status=bound expires-after=8m55s last-seen=1m5s active-address=172.16.16.120 active-mac-address=30:07:4D:F5:07:49 active-client-id="1:30:7:4d:f5:7:49" active-server=defconf host-name="Galaxy-S8" |
40 changes: 40 additions & 0 deletions
40
...erse_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging.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,40 @@ | ||
--- | ||
parsed_sample: | ||
- active_address: "192.168.69.254" | ||
active_client_id: "" | ||
active_mac_address: "" | ||
active_server: "*1" | ||
address: "192.168.69.254" | ||
address_lists: "" | ||
always_broadcast: "" | ||
client_id: "" | ||
comment: "" | ||
dhcp_option: "" | ||
expires_after: "6m59s" | ||
flag: "D" | ||
host_name: "" | ||
index: "0" | ||
last_seen: "35w12h24m42s" | ||
mac_address: "" | ||
server: "*1" | ||
src_mac_address: "12:34:56:78:90:AB" | ||
status: "conflict" | ||
- active_address: "172.16.16.120" | ||
active_client_id: "1:30:7:4d:f5:7:49" | ||
active_mac_address: "30:07:4D:F5:07:49" | ||
active_server: "defconf" | ||
address: "172.16.16.120" | ||
address_lists: "" | ||
always_broadcast: "" | ||
client_id: "1:30:7:4d:f5:7:49" | ||
comment: "" | ||
dhcp_option: "" | ||
expires_after: "8m55s" | ||
flag: "" | ||
host_name: "Galaxy-S8" | ||
index: "1" | ||
last_seen: "1m5s" | ||
mac_address: "30:07:4D:F5:07:49" | ||
server: "defconf" | ||
src_mac_address: "" | ||
status: "bound" |
3 changes: 3 additions & 0 deletions
3
...se_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging_2.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,3 @@ | ||
0 comment=UniFi1 address=10.124.3.199 mac-address=74:83:C2:36:5A:6E client-id=1:74:83:c2:36:5a:6e address-lists="" server=dhcp1 dhcp-option=unifi status=bound expires-after=6m51s last-seen=3m9s active-address=10.164.1.199 active-mac-address=74:83:C2:36:5A:6E active-client-id=1:74:83:c2:36:5a:6e active-server=dhcp1 host-name=Unifi3B | ||
1 comment=PC address=10.124.3.252 mac-address=00:50:56:88:80:EE client-id=1:0:50:56:88:80:ee address-lists="" server=dhcp1 dhcp-option="" status=bound expires-after=6m18s last-seen=3m42s active-address=10.164.1.252 active-mac-address=00:50:56:88:80:EE active-client-id=1:0:50:56:88:80:ee active-server=dhcp1 host-name=RSNC-CLIENT1-VM | ||
2 comment=SPA address=10.124.3.222 mac-address=C4:0A:CB:BC:65:C8 address-lists="" server=dhcp1 dhcp-option="" status=bound expires-after=5m56s last-seen=4m4s active-address=10.164.1.222 active-mac-address=C4:0A:CB:BC:65:C8 active-client-id=1:c4:a:cb:bc:65:c8 active-server=dhcp1 host-name=SPA122 |
59 changes: 59 additions & 0 deletions
59
...se_without-paging/mikrotik_routeros_ip_dhcp-server_lease_print_terse_without-paging_2.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,59 @@ | ||
--- | ||
parsed_sample: | ||
- index: "0" | ||
flag: "" | ||
comment: "UniFi1" | ||
address: "10.124.3.199" | ||
mac_address: "74:83:C2:36:5A:6E" | ||
client_id: "1:74:83:c2:36:5a:6e" | ||
address_lists: "" | ||
server: "dhcp1" | ||
always_broadcast: "" | ||
dhcp_option: "unifi" | ||
status: "bound" | ||
expires_after: "6m51s" | ||
last_seen: "3m9s" | ||
active_address: "10.164.1.199" | ||
active_mac_address: "74:83:C2:36:5A:6E" | ||
active_client_id: "1:74:83:c2:36:5a:6e" | ||
active_server: "dhcp1" | ||
host_name: "Unifi3B" | ||
src_mac_address: "" | ||
- index: "1" | ||
flag: "" | ||
comment: "PC" | ||
address: "10.124.3.252" | ||
mac_address: "00:50:56:88:80:EE" | ||
client_id: "1:0:50:56:88:80:ee" | ||
address_lists: "" | ||
server: "dhcp1" | ||
always_broadcast: "" | ||
dhcp_option: "" | ||
status: "bound" | ||
expires_after: "6m18s" | ||
last_seen: "3m42s" | ||
active_address: "10.164.1.252" | ||
active_mac_address: "00:50:56:88:80:EE" | ||
active_client_id: "1:0:50:56:88:80:ee" | ||
active_server: "dhcp1" | ||
host_name: "RSNC-CLIENT1-VM" | ||
src_mac_address: "" | ||
- index: "2" | ||
flag: "" | ||
comment: "SPA" | ||
address: "10.124.3.222" | ||
mac_address: "C4:0A:CB:BC:65:C8" | ||
client_id: "" | ||
address_lists: "" | ||
server: "dhcp1" | ||
always_broadcast: "" | ||
dhcp_option: "" | ||
status: "bound" | ||
expires_after: "5m56s" | ||
last_seen: "4m4s" | ||
active_address: "10.164.1.222" | ||
active_mac_address: "C4:0A:CB:BC:65:C8" | ||
active_client_id: "1:c4:a:cb:bc:65:c8" | ||
active_server: "dhcp1" | ||
host_name: "SPA122" | ||
src_mac_address: "" |