First of all - Hi for all. It is my first post here.
I need to monitor somehow when clients leave my hotspot.
For instance:
i give a trial internet via my hotspot for a 1 hour
client connect to hotspot, log-in via Trial link
and surf in the internet, say, 20 minutes, then just go away, or disable the Wi-Fi on his device
in the moment of disconnection (maybe when client disappears from registered by my Wlan ) i need to rung some script.
Hence i need to find out a way of how to check the disconnection moment.
Hope someone may help me. If i have described my goal not so clear, please say that, i will rephrase it.
Thank you mikrotick community in advance!
I’m afraid this is not possible with routerOS onboard tools.
You could either schedule a script which parses the log every n minutes - or you add logging wireless events to a syslog server and parse there.
created Log Parser Script (identical as in the wiki)
created Parser Action Script (there i have removed almost all if construction and edit one “:if ([:tostr $logTopics] = “wireless;info”) do={ …”)
Tried to edit second script plenty of times, and still can’t reach the “do={…” construction.
I have went further and checked the:
:global logParseVar
:local logTime [:pick [:toarray $logParseVar] 0]
:local logTopics [:pick [:toarray $logParseVar] 1]
:local logMessage [:pick [:toarray $logParseVar] 2]
As it turned out, the :global logParseVar contains only:
jul/26/2017 ,
But why :local logTopics [:pick [:toarray $logParseVar] 1] and :local logMessage [:pick [:toarray $logParseVar] 2] are empty??
Maybe someone may help with this as well?
Also why time in the jul/26/2017 format and not in the 16:16:22 as it is in the console??