Try to use this:if you don't need send it to email, remove the whole line 7.
ideal save it as script, like dhcp-lan-lease-script and put it inpermissions for the script must be ftp,reboot,read,write,policy,test,password,sniff,sensitive
Code:
#-----------------works----------------:if ($leaseBound =1) do={ local result ([/tool fetch url=("https://api.macvendors.com/".$leaseActMAC) output=user as-value ]) if ($result->"status" = "finished") do={ local comment0 ([/system clock get date]." | ".[/system clock get time]." | "."MAC Vendor: ".$result->"data") ip dhcp-server lease set [find mac-address=$leaseActMAC dynamic=yes] comment=$comment0 /tool e-mail send to=your@mail.com subject="DHCP-List-LAN" body="$leaseActIP - $"lease-hostname" - $leaseActMAC - $comment0" }}
ideal save it as script, like dhcp-lan-lease-script and put it in
Code:
ip/dhcp-server/add lease-script=dhcp-lan-lease-script
Statistics: Posted by makrob — Mon Jun 03, 2024 11:16 pm