2016-05-22 - Re: [GRASE-Hotspot] Re: Last user…. (MAC based)

Header Data

From: Timothy White <ti***8@gmail.com>
Message Hash: 64b70090bf7489e1bf588a91c7c442a0ea677e9ae1d6ee27aad9130021b84163
Message ID: <CAESLx0+LgWs6t5WVmpmKaUnEohLooA=e_25GJtOUW5eZ4pMynQ@mail.gmail.com>
Reply To: <2e58f5d4-9b0f-400e-bb04-0a567a931d71@grasehotspot.org>
UTC Datetime: 2016-05-22 14:17:27 UTC
Raw Date: Mon, 23 May 2016 07:17:27 +1000

Raw message

Hi José

Do you find any slowdown of the system doing this? Part of the reason I'd
gone for the ~2 month mark was to ensure that the system was running
quickly as the database tables haven't been optimised for many months of
data.

In general, my response to keeping more data has been to point the user to
the backups. We take a nightly backup of the database, which IMHO means we
don't need to keep the detailed session data in the live database. Also,
what information do you need to keep, as you'll want to ensure the squid
logs are backed up as well then.

What might be useful is for people to fill in details at
https://github.com/GraseHotspot/grase-www-portal/issues/156 for the
logging/history requirements in their country. Then I can try and
accommodate the different requirements, and provide options to toggle
between storing for X and storing for Y and not storing at all.

Tim

On Sat, May 14, 2016 at 1:28 AM, José Borges <jo***s@algardata.pt>
wrote:

> Tim,
>
> On the same subject, we had to change the code that did the 2 months
> cleaning up (of sessions/vouchers) due to legal necessities in Europe
> (Portugal), where we have to keep the last 12 months of history in the
> HOTSPOT, maybe it would be nice, to have a parameter in backoffice to say
> "Clean history after (months):"
>
>
> sexta-feira, 13 de Maio de 2016 às 00:18:23 UTC+1, timwhite88 escreveu:
>>
>> Hi Paul,
>> In future post things like this to the list. Others may have already
>> written scripts that can help you.
>>
>> 3 Months is a tricky time frame. Last login details are in the
>> radpostauth table. That's cleaned up regularly though, at the 2 month mark
>> I think. So the next place to look is if there are any entries in the
>> mtotacct table (something like that, I'm not near the code at the moment).
>> It's the table that we archive (around the 2 month mark) previous sessions
>> into a single monthly summary.
>>
>> So if there are no entries in that table for the last 3 months, and no
>> entires in the radpostauth table for the last 3 months, then they are
>> inactive.
>>
>> Also, not sure why you need the radcomment table to get MAC addresses.
>> The radcheck table should have all enabled users in it.
>>
>> If you work out the query you need, I can add it to the nightly cron job,
>> and make it an option to run it from the admin interface. (Although to mail
>> you you'd need to update the crontab)
>>
>> Looking forward to seeing how you go.
>>
>> Tim
>>
>> On Fri, May 13, 2016 at 12:29 AM, J.P van Oijen <je***.@gids.nl> wrote:
>>
>>>
>>> Hai Tim,
>>>
>>> Before going/posting into the mailgroup can I ask you something?
>>>
>>> I want to make a cleanup script that automaticaly mails me users that
>>> are 3
>>> months without activity. After that I can delete them keepipng the list
>>> clean.
>>>
>>> My idea was:
>>>
>>> - read radius radcomment to get a list of all current MAC addresses
>>> allowed (I
>>> use only mac addresses for users)
>>>
>>> - And than search for that MAC address for the last access / succesful
>>> login
>>>
>>> Would that be working as I have troubles finding that last successful
>>> login
>>> date / last access.
>>>
>>> Maybe you can provide a hint...
>>>
>>> Chrs Paul
>>>
>>>
>>>
>>>
>> --
> This mailing list is for the Grase Hotspot Project http://grasehotspot.org
> ---
> You received this message because you are subscribed to the Google Groups
> "Grase Hotspot" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gr***e@grasehotspot.org.
> To post to this group, send email to gr***t@grasehotspot.org.
> Visit this group at
> https://groups.google.com/a/grasehotspot.org/group/grase-hotspot/.
> To view this discussion on the web visit
> https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/2e58f5d4-9b0f-400e-bb04-0a567a931d71%40grasehotspot.org
> <https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/2e58f5d4-9b0f-400e-bb04-0a567a931d71%40grasehotspot.org?utm_medium=email&utm_source=footer>
> .
>

Thread