(RADIATOR) Conditional log format

Claudio Lapidus clapidus at gmail.com
Mon Apr 24 19:06:45 CDT 2006


Hello

We're setting up an accounting file format for an external application
that handles Livingston files. Unfortunately, the Livingston flavor
produced by Radiator is not suitable and we must artificially recreate
the format. We have the following in the config file:

AcctLogFileFormat	%q, %d %v %Y %H:%M:%S%r	\
			User-Name = %{User-Name}%r	\
			NAS-Port-Type = %{NAS-Port-Type}%r	\
			NAS-Port = %{NAS-Port}%r	\
			NAS-IP-Address = %{NAS-IP-Address}%r	\
			Framed-IP-Address = %{Framed-IP-Address}%r	\
			Acct-Status-Type = %{Acct-Status-Type}%r	\
			Acct-Session-Id = %{Acct-Session-Id}%r	\
			Acct-Session-Time = %{Acct-Session-Time}%r	\
			Acct-Delay-Time = %{Acct-Delay-Time}%r	\
			Acct-Terminate-Cause = %{Acct-Terminate-Cause}%r	\
			Acct-Input-Octets = %{Acct-Input-Octets}%r	\
			Acct-Output-Octets = %{Acct-Output-Octets}%r	\
			Acct-Input-Packets = %{Acct-Input-Packets}%r	\
			Acct-Input-Packets = %{Acct-Output-Packets}%r 	\
			Acct-Output-Gigawords = %{Acct-Input-Gigawords}%r	\
			Acct-Output-Gigawords = %{Acct-Output-Gigawords}%r%r

which, given the command:

radpwtst -noauth -nostart

gives the following result in the detail file:

Mon, 24 Apr 2006 20:54:32
        User-Name = mikem
        NAS-Port-Type = Async
        NAS-Port = 1234
        NAS-IP-Address = 203.63.154.1
        Framed-IP-Address =
        Acct-Status-Type = Stop
        Acct-Session-Id = 00001234
        Acct-Session-Time = 1000
        Acct-Delay-Time = 0
        Acct-Terminate-Cause =
        Acct-Input-Octets = 20000
        Acct-Output-Octets = 30000
        Acct-Input-Packets =
        Acct-Input-Packets =
        Acct-Output-Gigawords =
        Acct-Output-Gigawords =

Now, we need a way to include the reference to a certain attribute
only if it is actually present in the packet, so as to avoid those
"blank value" lines. Is there a way to specify this from the config
file?

thanks in advance
cl.

--
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