Customizing Hotspot status.html

Hi Guys,

I am not sure if this is possible but hear goes anyway>

I have been trying to modify the status.html page. I have pre-paid cap plans and would like to display the user queue info for the user logged in (rx-max-limit). So the user realizes they have been capped.

Thank Paul

Here is the wiki section on customizing the hotspot pages:
http://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot
The variables “remain-bytes-in” and “remain-bytes-out” might be what you want.

Hi,


I have looked though the wiki and cannot find anything about bandwidth, I have tried all the variables none specify the queue tree.

It may not be possible! If anyone knows otherwise please let me know.


Thanks Paul

If you’re using RADIUS (User Manager is a RADIUS server) you can display the attributes that server sends back.

Thanks fewi,

I do use a Linux radius server, but i don’t know how to to extract the bandwidth to a specific user on a summary page.

for example>

I have replace the rdirect.hlml page with a welcome page with some redirect links to common website. inside this page i have a sub window that link to the status.html page witch displays the user-name & usage statistics,


I would like to display the queue value tunnel size. I know radius tells the router to set the queue to ??? and send a queue value to the radius server. when a user logs directly onto the radius server using the same user-name and password as they logged onto the hotpot with. The page will provide the queue value & associated user information. Can i extract this information form the radius server and place it onto the summary page without authentication directly to the radius server.

Thanks Paul

Yes, a link to that has already been posted.
http://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot#List_of_available_variables

RADIUS-related variables:

radius - show the attribute identified with in text string form (in case RADIUS authentication was used; “” otherwise)
radiusu - show the attribute identified with in unsigned integer form (in case RADIUS authentication was used; “0” otherwise)
radius- - show the attribute identified with and vendor ID in text string form (in case RADIUS authentication was used; “” otherwise)
radius-u - show the attribute identified with and vendor ID in unsigned integer form (in case RADIUS authentication was used; “0” otherwise)

Combine that with this information:
http://wiki.mikrotik.com/wiki/Manual:RADIUS_Client

MikroTik Specific RADIUS Attribute Numeric Values
Name VendorID Value RFC
MIKROTIK_RECV_LIMIT 14988 1
MIKROTIK_XMIT_LIMIT 14988 2
MIKROTIK_GROUP 14988 3
MIKROTIK_WIRELESS_FORWARD 14988 4
MIKROTIK_WIRELESS_SKIPDOT1X 14988 5
MIKROTIK_WIRELESS_ENCALGO 14988 6
MIKROTIK_WIRELESS_ENCKEY 14988 7
MIKROTIK_RATE_LIMIT 14988 8
MIKROTIK_REALM 14988 9
MIKROTIK_HOST_IP 14988 10
MIKROTIK_MARK_ID 14988 11
MIKROTIK_ADVERTISE_URL 14988 12
MIKROTIK_ADVERTISE_INTERVAL 14988 13
MIKROTIK_RECV_LIMIT_GIGAWORDS 14988 14
MIKROTIK_XMIT_LIMIT_GIGAWORDS 14988 15
MIKROTIK_WIRELESS_PSK 14988 16
MIKROTIK_TOTAL_LIMIT 14988 17
MIKROTIK_TOTAL_LIMIT_GIGAWORDS 14988 18
MIKROTIK_ADDRESS_LIST 14988 19



Mikrotik-Rate-Limit - Datarate limitation for clients. Format is: rx-rate[/tx-rate] [rx-burst-rate[/tx-burst-rate] [rx-burst-threshold[/tx-burst-threshold] [rx-burst-time[/tx-burst-time] [priority] [rx-rate-min[/tx-rate-min]]]] from the point of view of the router (so “rx” is client upload, and “tx” is client download). All rates should be numbers with optional ‘k’ (1,000s) or ‘M’ (1,000,000s). If tx-rate is not specified, rx-rate is as tx-rate too. Same goes for tx-burst-rate and tx-burst-threshold and tx-burst-time. If both rx-burst-threshold and tx-burst-threshold are not specified (but burst-rate is specified), rx-rate and tx-rate is used as burst thresholds. If both rx-burst-time and tx-burst-time are not specified, 1s is used as default. Priority takes values 1..8, where 1 implies the highest priority, but 8 - the lowest. If rx-rate-min and tx-rate-min are not specified rx-rate and tx-rate values are used. The rx-rate-min and tx-rate-min values can not exceed rx-rate and tx-rate values.

You want to display the RADIUS variable for vendor 14988, id 8.

Hi fewi,

Thank-you for your explanation!

I have run into another problem

in the status.html

i added

$(radius<8>-<14988>)

I have tried lots of combination. I have also tried following other forum pages without success.


what am i doing wrong?

ROS:4.6

Paul.

Hmmm. As far as I know that should work.

Shoot an email to support@mikrotik.com - you won’t get a reply before Monday so that also gives other people time to see this here. I’m out of ideas given that I think what you’re doing is correct.