Hi, I need Help to try to create a new table (MariaDB) with one row from each user identified by day on the radacct. Because radacct is growing fast I need to store a new table with the visits per day by username. Something like visits_table idVisits_table username date_visit with username and date_visit unique keys. Also a need to store this table in a different server from the server where is installed the radius_db. I've been reading and I can do a trigger on radius_db and every insert on radacct fire an insert-update on the new visits_table. Also a I can create this visits_table as a FederatedX table on the other MariaDB machine. I would like to know if someone have done this before and can give me a little bit of light on how to solve this. I think with the trigger and plus the FederatedX maybe a slow down to much the database, maybe some code (need help in this) on the radius part will do the job better. If anyone can give me a hand will be appreciate. Thanks. Oscar
No one ? -----Mensaje original----- De: Freeradius-Users [mailto:freeradius-users-bounces+oscar=jofre.com@lists.freeradius.org] En nombre de Oscar Jofre Enviado el: miƩrcoles, 28 de febrero de 2018 19:37 Para: 'FreeRadius users mailing list' <freeradius-users@lists.freeradius.org> Asunto: Vists every day Hi, I need Help to try to create a new table (MariaDB) with one row from each user identified by day on the radacct. Because radacct is growing fast I need to store a new table with the visits per day by username. Something like visits_table idVisits_table username date_visit with username and date_visit unique keys. Also a need to store this table in a different server from the server where is installed the radius_db. I've been reading and I can do a trigger on radius_db and every insert on radacct fire an insert-update on the new visits_table. Also a I can create this visits_table as a FederatedX table on the other MariaDB machine. I would like to know if someone have done this before and can give me a little bit of light on how to solve this. I think with the trigger and plus the FederatedX maybe a slow down to much the database, maybe some code (need help in this) on the radius part will do the job better. If anyone can give me a hand will be appreciate. Thanks. Oscar - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Mar 1, 2018, at 5:46 PM, Oscar Jofre <oscar@jofre.com> wrote:
No one ?
This is largely an SQL question. You can write a script to post-process radacct, and then write the data to a new table.
I would like to know if someone have done this before and can give me a little bit of light on how to solve this.
It's a custom solution for your site. You will need to understand how to create the solution.
I think with the trigger and plus the FederatedX maybe a slow down to much the database, maybe some code (need help in this) on the radius part will do the job better.
Maybe. Maybe not. The server contains documentation describing how to use SQL, what the queries are, etc. It's possible to read those, and to design a custom solution for your site. We can help with details. But... we're not going to do it all for you. It's better for you to ask *specific* questions about how to do something. Alan DeKok.
participants (2)
-
Alan DeKok -
Oscar Jofre