The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

aggregate_daily - Utility script for use with FreeRADIUS::Database

SYNOPSIS

  # aggregate yesterday as designed to be run via cron.
  # This is the natural, designed, daily operation

  ./aggregate_daily

  # aggregate a specific month. Pass the --day argument
  # to inform the system how many days since the 1st of the
  # month to process. In this case, the month of June, 2009

  aggregate_daily --month|-m 2009-06 --days|-d 30

  # perform a run for a longer period of time
  # in this case, we run a year commencing June 1st, 2009

  aggregate_daily --month|-m 2009-06 --days|-d 365

  # override the configuration file nas classification setting.
  # 1 enables classification, 0 disables it

  # NOTE: performing this override is NOT recommended.

  aggregate_daily --classify|-c 1
  
  # display help

  aggregate_daily --help|-h

  # display the manual page

  aggregate_daily --man|-M

  # add verbosity

  aggregate_daily --verbose|-v

OPTIONS

--month | -m

Specify the month in which you want to work on in the form YYYY-MM. If the month parameter is not supplied, we will work on the date that was existent yesterday.

When the month argument is specified, we start at the 1st day of that month.

--days | -d

Specify the number of days that you want to process, commencing from the first day of the month specified with the --month argument

--classify | -c

Provides the ability to override the 'ras_classification' variable in the underlying module's configuration file. It is highly recommended that this parameter is not used, unless you understand the consequences.

--verbose | -v

Prints out whether the underlying aggregation task failed or finished successfully. Very handy for email coming out of cron.

DESCRIPTION

aggregate_daily is a utility script for the FreeRADIUS::Database module.

It aggregates the entries from the RADIUS `radacct` table by UserName and NASIPAddress, and inserts the aggregated information into a `aggregated_daily` table.

If month 'reruns' are performed, we clean out the aggregation table prior to re-aggregating.

NOTE: The 'ras_classification' directive in the freeradius_database.conf config file determines whether the NASIPAddress will be converted into a group name. Using the 'classify' override is NOT recommended. To conform with site database consistency, it is recommended to change the option globally in the configuration file instead.

AUTHOR

Steve Bertrand, <steveb@cpan.org>

COPYRIGHT

Copyright (C) 2012 by Steve Bertrand

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.9 or, at your option, any later version of Perl 5 you may have available.