Script to check connected devices on wifi

Hello,

I am new to this forum with MK. I wanted to know how I could make the script to send me email when I connected WIFI device - I know MAC. (for example, when I connect the phone with the MAC address XX: XX: XX: XX: XX: XX, then send me MK email with the text: phone connected and when disconnecting the phone, MK send me email with the text: phone disconnected.

Thank you. Greetings.

https://wiki.mikrotik.com/wiki/Manual:S … _log_entry

You can sent email based on whatever you want in the log (Mac address, words like “login” etc.)
You just need to make sure that you actually log those things.

Be aware you might get flooded with emails, as Wifi can connect and disconnect quit often if signal strength is low and changing

Hello, thank you for your reply. Please send me URL once again?

Thank you

Thank you! But I need to be informed only about one particular mac address. Can I add a filter to script?

You could setup a log server and use a tool to look at it. I have (in my signatur) setup a project that does send everything to Splunk (free software)
One of the view shows Wifi connection. You can there select periode/user etc and see when someone logs inn and out.

See an example here:
Wifi_connection.jpg