Skip to content

Instantly share code, notes, and snippets.

@tguruslan
Created February 22, 2024 09:04
Show Gist options
  • Save tguruslan/01e2a4f4c5d3f5d78debc9fcbe13c14c to your computer and use it in GitHub Desktop.
Save tguruslan/01e2a4f4c5d3f5d78debc9fcbe13c14c to your computer and use it in GitHub Desktop.
mikrotik discord send dhcp address
:global discordWebhookUrl "https://discordapp.com/api/webhooks/..."
:global interfaceName "ether1"
:while ([/ping 8.8.8.8 interval=3 count=1] = 0) do={
:delay 5
}
/tool fetch url=($discordWebhookUrl . "?wait=true") http-method=post http-data=("content=" . "#".[/system identity get name]."+" . [/ip address get [find interface=$interfaceName] address])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment