(RADIATOR) Logging multiple Framed-Route's
Francisco Rodrigo Cortinas Maseda
francisco.cortinas at jazztel.com
Fri Jun 13 01:40:33 CDT 2008
Hi,
I use this code to parse every cisco av-pair, splitting it into the ones
it has internally:
sub {
my $p=${$_[0]};
if (my @avpair = $p->get_attr('cisco-avpair')) {
foreach my $avpair (@avpair) {
$p->add_attr(split('=',$avpair));
}
}
}
Maybe with a little modifications, you can parse all the attributes you
want.
Bye.
-----Mensaje original-----
De: owner-radiator at open.com.au [mailto:owner-radiator at open.com.au] En
nombre de Hugh Irvine
Enviado el: viernes 13 de junio de 2008 0:18
Para: Jim Tyrrell
CC: radiator at open.com.au
Asunto: Re: (RADIATOR) Logging multiple Framed-Route's
Hello Jim -
I suggest not using the AcctLogFileFormat specifiaction so you get
the entire accounting record in the accounting file. You can then
parse it however you need to to insert it into the database.
Otherwise you can use a hook to manipulate the accounting attributes.
There are a number of example hooks in "goodies/hooks.txt".
regards
Hugh
On 12 Jun 2008, at 22:27, Jim Tyrrell wrote:
> Hi,
>
> We have Radiator logging all accounting records to a text file in
> CSV format which is then inserted into a MySQL database by a
> separate script. We are changing a few things which means users
> can have multiple Framed-Route's, and our LNS will also become an
> LTS which means multiple Tunnel-Server-Endpoint & Tunnel-Client-
> Endpoint.
>
> The authentication works fine, however, when it comes to accounting
> log we only get the 1st instance of this attribute in the text file
> and so into our MySQL database. How do we handle this so we can
> log additional occurances of these attributes?
>
> ==== Example log format ====
> AcctLogFileFormat "%{User-Name}",%{Timestamp},"%{Acct-Session-
> Id}","%{Framed-IP-Address}",\
> "%{Framed-IP-Netmask}","%{Framed-Route}","%{Tunnel-Client-
> Endpoint}","%{Tunnel-Server-Endpoint}"
>
>
> ==== The Radius accounding debug shows something such as ====
> Code: Accounting-Request
> Attributes:
> User-Name = "user_a"
> Acct-Status-Type = Start
> Acct-Session-Id = "FF10FFFF583B572A-4850EE4C"
> Framed-Route = "192.168.0.0/30 10.0.0.1"
> Framed-Route = "192.168.1.0/29 10.0.0.1"
> Framed-IP-Address = 10.0.0.1
> Framed-IP-Netmask = 255.255.255.255
>
>
> Code: Accounting-Request
> Attributes:
> User-Name = "user_b"
> Acct-Status-Type = Start
> Tunnel-Server-Endpoint = 1:10.10.10.10
> Tunnel-Client-Endpoint = 1:192.168.20.1
> Tunnel-Client-Endpoint = 2:192.168.20.2
> Tunnel-Server-Endpoint = 2:172.16.1.1
>
>
> I need to either insert all occurrences of the attribute into the
> same field with a separator, or additional occurrences need to be
> logged to a separate field. At present we will get the 1st
> attribute logged into the field in the CSV and into MySQL and all
> others will be ignored.
>
> Thanks.
>
> Jim.
>
> This email has been scanned for all viruses by the MessageLabs
> SkyScan service.
>
> Please consider the environment before printing this email.
>
> The content of this email and any attachment is private and may be
> privileged. If you are not the intended recipient, any use,
> disclosure, copying or forwarding of this email and/or its
> attachments is unauthorised. If you have received this email in
> error please notify the sender by email and delete this message and
> any attachments immediately. Nothing in this email shall bind the
> Company or any of its subsidiaries or businesses in any contract or
> obligation, unless we have specifically agreed to be bound.
>
> KCOM Group PLC is a public limited company incorporated in England
> and Wales, company number 02150618 and whose registered office is
> at 37 Carr Lane, Hull, HU1 3RE.
>
> 118288 - KCOM UK Directory Enquiries. Calls cost 49p connection +
> 14p per minute including VAT from a KC or BT landline. Call charges
> from mobiles and other networks may vary. If you are calling from a
> mobile you will now receive your requested number via text message.
> You will not be charged for the text message.
>
>
NB:
Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive (www.open.com.au/archives/
radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?
Have you checked the RadiusExpert wiki:
http://www.open.com.au/wiki/index.php/Main_Page
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
Includes support for reliable RADIUS transport (RadSec),
and DIAMETER translation agent.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
Antes de imprimir este e-mail piense bien si es necesario hacerlo.
Antes de imprimir este e-mail piense bien si es necesario hacerlo.
*********
Este mensaje es privado y CONFIDENCIAL y se dirige exclusivamente a su destinatario. Si usted ha recibido este mensaje por error, no debe revelar, copiar, distribuir o usarlo en ningun sentido. Le rogamos lo comunique al remitente y borre dicho mensaje y cualquier documento adjunto que pudiera contener. El correo electronico via Internet no permite asegurar la confidencialidad de los mensajes que se transmiten ni su integridad o correcta recepcion. JAZZTEL no asume responsabilidad por estas circunstancias. Si el destinatario de este mensaje no consintiera la utilizacion del correo electronico via Internet y la grabacion de los mensajes, rogamos lo ponga en nuestro conocimiento de forma inmediata.Cualquier opinion expresada en este mensaje pertenece unicamente al autor remitente, y no representa necesariamente la opinion de JAZZTEL, a no ser que expresamente se diga y el remitente este autorizado para hacerlo.
*********
This message is private and CONFIDENTIAL and it is intended exclusively for its addressee. If you receive this message in error, you should not disclose, copy, distribute this e-mail or use it in any other way. Please inform the sender and delete the message and attachments from your system.Internet e-mail neither guarantees the confidentiality nor the integrity or proper receipt of the messages sent. JAZZTEL does not assume any liability for those circumstances. If the addressee of this message does not consent to the use of Internet e-mail and message recording, please notify us immediately.Any views or opinions contained in this message are solely those of the author, and do not necessarily represent those of JAZZTEL, unless otherwise specifically stated and the sender is authorised to do so.
*********
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list