I would like to log users using network. I create own version from few different script to log dhcp assign operation on disk and sent it to me via e-mail.
I would like to achieve information - how offen "known - by mac" people are using network (wifi).
/tool e-mail send to="xxx" subject=([/system identity get name] . " Log " . [/system clock get date]) file=("dhcpLog.0.txt");
:wait 10;
/file set [find name="dhcpLog.0.txt"] contents=""
:log info ("System Log emailed at " . [/sys cl get time] . " " . [/sys cl get date]);
I add new log
4 dhcp dhcpLog dhcpLog
!debug
!packet
and new action for it
4 name="dhcpLog" target=disk disk-file-name="dhcpLog"
disk-lines-per-file=10000 disk-file-count=1 disk-stop-on-full=no
once a day MT sent to me e-mail
But.. I am worry about this solution.
- Between sending e-mail and delay I can lose some logs.
- I set file with "" value because I can't create log file from script. With file, MT will not log. (How to create a new file by Mikrotik routers' scripting)