Filtering accounting messages
liran kessel
lirankessel at gmail.com
Mon Jul 15 13:54:44 CEST 2019
I have added the recommended check and the accounting section looks like this
accounting {
unix
if ("%{sql:SELECT coalesce(1,0) FROM [TABLE_NAME] WHERE ne_id='%{Calling-Station-Id}'}" == 1)
{
sql
}
exec
attr_filter.accounting_response
}
However when running radiusd it fails with this error
# Loading preacct {...}
# Loading accounting {...}
/etc/raddb/sites-enabled/default[642]: Failed to find "{" as a module or policy.
/etc/raddb/sites-enabled/default[642]: Please verify that the configuration exists in /etc/raddb/mods-enabled/{.
/etc/raddb/sites-enabled/default[642]: Failed to parse "{" entry.
/etc/raddb/sites-enabled/default[608]: Errors parsing accounting section.
> On 15 Jul 2019, at 10:11, Alan DeKok <aland at deployingradius.com> wrote:
>
> On Jul 14, 2019, at 10:07 PM, liran kessel <lirankessel at gmail.com> wrote:
>> I understand what you proposed but this (my users) is a dynamic list that will grow constantly so the question is what would be the best way to keep it updated within the configuration?
>
> This is what databases are for.
>
> FreeRADIUS is a RADIUS server. We don't implement internal databases. We just use normal databases.
>
>> As I said in the original mail , we are growing to over 150k unique calling-station-ids that around 80% should be recorded to the DB while 20% shouldn’t.
>> Maybe storing the list in a file that I can reference in the suggested “if” statement?
>> Or maybe there is way to cache the list in memory to speed it up even more?
>
> Use Redis. We've tested it at 10K+ complex queries per second with FreeRADIUS. That should be more than sufficient for your needs.
>
> Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list