Re: Questions about Freeradius counter

2007-03-27 Thread guest01
Hi

Thanks for your help.

 U can specify the sql query for the counter:
 counter maxinput {
filename = ${logdir}/db.maxinput
key = User-Name
count-attribute = Acct-Input-Octets
reset = never
counter-name = Input-Octets
check-name = ChilliSpot-Max-Input-Octets
query = SELECT
 SUM(Acct-Input-Octets+Acct-Output-Octets) FROM radacct
 where UserName='%{%k}'
 }


Ok, sounds reasonable, but I forgot to mention that I am not using
SQL, I am using just the simple counter module which uses files and I
suppose I can't use the query. At least it didn't work.

And another thing I forgot to mention .. I am using a Debian Woody
(yes, I know, it is pretty much outdated ...) with Freeradius
FreeRADIUS Version 1.0.2.

I suppose it would be a good idea to update our system :-)

best regards
Peter
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Questions about Freeradius counter

2007-03-25 Thread fadli

On 3/22/07, guest01 [EMAIL PROTECTED] wrote:


Hi guys!

I have two minor problems with the radius counter. I am using the radius
counter for counting the sessiontimeout, which works quite good.

counter sessiontimeout {
   filename = ${logdir}/db.sessiontimeout
   key = User-Name
   count-attribute = Acct-Session-Time
   reset = never
   counter-name = Daily-Session-Time
   check-name = Session-Timeout
   cache-size = 5000
}

If the user reaches the saved allowed max session time, the connection
gets disconnected and the user is not allowed to connect again until the
time value has been reseted. Works great ...


I also want to achieve the same behavior for another counter, the

Acct-Input-Octets, but it doesn't really work. I can define a maximum
value for Input Octets and if the user exceeds this value, he cannot
connect again. Unfortunately, the connection doesn't get disconnected
after the user reached his limit, do I have to configure something
additional? It works for the Sessiontimeout, why doesn't it work for the
Input-Octets? Any ideas? Is it possible?

counter maxinput {
   filename = ${logdir}/db.maxinput
   key = User-Name
   count-attribute = Acct-Input-Octets
   reset = never
   counter-name = Input-Octets
   check-name = ChilliSpot-Max-Input-Octets
   cache-size = 5000
}



I face the same problem on Freeradius 1.1.3, and to overcome the situation,
I wrote a perl script to set the correct ChilliSpot-Max-Input-Octets for
Freeradius. But I have upgraded to Freeradius 1.1.4, the no more problem
with it.



The second problem is, that I have Acct-Input-Octets AND
Acct-Output-Octets in my radius dialog and I want to use ONE counter,
which should contain the sum of Acct-Input-Octets+Acct-Output-Octets, I
already tried to use
count-attribute = (Acct-Input-Octets+Acct-Output-Octets),
but it didn't work ... Any suggestions for that problem? Any ideas?



U can specify the sql query for the counter:
counter maxinput {
  filename = ${logdir}/db.maxinput
  key = User-Name
  count-attribute = Acct-Input-Octets
  reset = never
  counter-name = Input-Octets
  check-name = ChilliSpot-Max-Input-Octets
  query = SELECT SUM(Acct-Input-Octets+Acct-Output-Octets) FROM
radacct where UserName='%{%k}'
}


I appreciate every kind of help!

Thanks guys!

best regards
Peter Gastinger

-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html





--
Best Regards,

Fadli M. Zain
Leadership and Lifelong Learning
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Questions about Freeradius counter

2007-03-22 Thread guest01
Hi guys!

I have two minor problems with the radius counter. I am using the radius
counter for counting the sessiontimeout, which works quite good.

counter sessiontimeout {
filename = ${logdir}/db.sessiontimeout
key = User-Name
count-attribute = Acct-Session-Time
reset = never
counter-name = Daily-Session-Time
check-name = Session-Timeout
cache-size = 5000
}

If the user reaches the saved allowed max session time, the connection
gets disconnected and the user is not allowed to connect again until the
time value has been reseted. Works great ...

I also want to achieve the same behavior for another counter, the
Acct-Input-Octets, but it doesn't really work. I can define a maximum
value for Input Octets and if the user exceeds this value, he cannot
connect again. Unfortunately, the connection doesn't get disconnected
after the user reached his limit, do I have to configure something
additional? It works for the Sessiontimeout, why doesn't it work for the
Input-Octets? Any ideas? Is it possible?

counter maxinput {
filename = ${logdir}/db.maxinput
key = User-Name
count-attribute = Acct-Input-Octets
reset = never
counter-name = Input-Octets
check-name = ChilliSpot-Max-Input-Octets
cache-size = 5000
}

The second problem is, that I have Acct-Input-Octets AND
Acct-Output-Octets in my radius dialog and I want to use ONE counter,
which should contain the sum of Acct-Input-Octets+Acct-Output-Octets, I
already tried to use
count-attribute = (Acct-Input-Octets+Acct-Output-Octets),
but it didn't work ... Any suggestions for that problem? Any ideas?

I appreciate every kind of help!
Thanks guys!

best regards
Peter Gastinger

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html