Script to save hotspot active users

Hello,

I have 2 mikrotiks which work with vrrp. When the first Mikrotik goes down, I would like to restore on the other mikrotik all active users.
I thought to use export, fetch and import but I didn’t find how to export the good informations, there is no ip hotspot active export or something like that… Do you have an idea or a script which is able to do that?

Thank you.

Use radius server to store client authentication information and clone hotspot configuration on both routers.

thank you for your answer.

I use freeradius, in fact I want to restore all hotspot active users on the second mikrotik in order to be able to remove all these sessions on the radius; indeed, when my Wan interface goes down, the communication between radius and the first mikrotik is cut, so I would like my second mikrotik to be able to remove all these connexions to let the users log in again.

I have the same problem with this, is there anybody can give the solution?
thx

You cannot do that from RouterOS. Any solution is going to have to be based on the RADIUS server (hack up the simultaneous use functionality to enforce only one login per NAS IP?) or on a third server that monitors VRRP failover and logs into the AAA to delete sessions.

I’ve investigated this previously.

It doesn’t appear possible with hotspot at this time, however pppoe sessions should automatically re-login on the new router as soon as the vrrp fallover takes place.
That’s simply due to the fact that pppoe sessions are normally set to re-auth on any drops, whereas the hotspot login requires physical user intervention.

You could try to offer both hotspot and pppoe logins for your users to give them the choice, however the hotspot side of this is simply not possible without some sort of hack to force sessions to start on the hotspot without a user login.

Thought: If you wanted to enable the mac-address login you could try copying these between the routers every couple of minutes or something similar.

thx for re!!!
but i want any easy,
exable:
it is posible and easy to run script (ip hotspot active print count-only) on login and inform html page from txt file ??

thx
br