LDAP Accounting

Arran Cudbard-Bell a.cudbardb at freeradius.org
Mon Dec 10 12:49:28 CET 2012


On 10 Dec 2012, at 09:43, Olivier Beytrison <olivier at heliosnet.org> wrote:

> On 10.12.2012 01:33, Arran Cudbard-Bell wrote:
>> 	accounting {
>> 		reference = "%{tolower:type.%{Acct-Status-Type}}"
>> 		
>> 		type {
>> 			start {
>> 				update {
>> 					description := "Online at %S"
>> 				}
>> 			}
>> 			
>> 			interim-update {
>> 				update {
>> 					description := "Online at %S"
>> 				}
>> 			}
>> 			
>> 			stop {
>> 				update {
>> 					description := "Offline at %S"
>> 				}
>> 			}
>> 		}
>> 	}
> 
> Would it work to update the loginTime using in the update section
> loginTime := "%{integer:event-time}Z"? What's the "timezone" used by the
> event-time? local machine time?

RFC says:

5.3.  Event-Timestamp

   Description

      This attribute is included in an Accounting-Request packet to
      record the time that this event occurred on the NAS, in seconds
      since January 1, 1970 00:00 UTC.


But it'll probably just be the local time on the NAS.

%{integer:Event-Timestamp} should get you it in original unix timestamp form yes.

-Arran


More information about the Freeradius-Devel mailing list