My problem is the following:
I would like to have a script that stores the movements of all users in a file and then send it as an email to me.
I need infomation about:
Username
Download
Upload
Uptime
and more.....
This information I can get all from the User-Manager with:
Code: Select all
/tool user-manager session print
This is my try:
Code: Select all
:log info "Start DailySessionReport Script"
:local count
/tool user-manager session print append file="total_session.txt"
:delay 2s
/tool user-manager session print value-list file="daily_session.txt"
:set count [/tool user-manager session print count-only;]
:local i [/tool user-manager session print count-only;]
:local x 1
:while ($i >= ($x )) do={
/tool user-manager session print;
/system script run Remove
:set x ($x + 1);
}
/tool e-mail send to="xxxx.xxxxx@xxxxx.de" body="Bewegungen im PPPPPP-XXXXX Es wurden $count Bewegungen gezählt. " subject="Bewegungen im PPPPPP-XXXXX " file=("daily_session.txt")
:log info "END DailySessionReport Script"
Code: Select all
:log info "Remove Start"
/tool user-manager session remove numbers=0
:log info "Remove End"
and this isn't what I want!
The session information should not be deleted from the user manager.
has someone an idea?
I use RouterOS V6.1
Thanks.
Regards
Zeup