mysqlRadacct Tutorial

Since 1.0
We added CHANGES. Look there for info on development and outstanding bugs and/or feature requests.
When upgrading make sure you check "mysqlRadacct.cgi UpdateSchema." See INSTALL for more details. And below*.

Auto hold and auto warn on number of hours

#
#mysqlRadacct auto hold users feature
#
20 4 * * * /cgi-bin/mysqlRadacct.cgi HoldUsers 200 yourmysqldbrootpwd > /dev/null
#
#mysqlRadacct warn only. Choose only one and comment accordingly
#
#10 5 * * * /cgi-bin/mysqlRadacct.cgi HoldUsersWarnOnly 190 yourmysqldbrootpwd  > /dev/null
Remember that all mysqlRadius ext and local crontabs must be working perfectly. This new version has typical tConfiguration table and HoldUsers will send an email via cLabel/cValue pairs:
cHoldUsersEmail
cMTA
cMTAArgs
cFromEmail
These come preloaded and with comments on how to use. As do most tConfiguration label/value pairs in all mysqlISP applications.

Monthly Report
mysqlRadacct extracts and archives detail file info for report use and to keep things organized. It has a couple of new things like tRadacctMonth where you can search through previous months data and tMonth which is just a list of archived and extracted from tRadacct (the live Cistron modified radiusd table for the current month) month data.

Modified Cistron Hints
Make sure your sqlserver file is in the right raddb directory and is setup correctly

Ex. sqlserver file and mysql command to get it working

#sqlserver file start
server          localhost
login           cistron
password        wsxedc
acct_db         mysqlradacct
acct_table      tRadacct
doacct          yes
keepopen        yes
#sqlserver file end

grant all on mysqlradacct.* to cistron@localhost identified by 'wsxedc';

Make and install /bin/lastmonth. With 'shell>make install-lastmonth'

Make sure mySQL distributed binaries (or sym links to them) myisampack and myisamchk are in /usr/bin

Example crontab entries. For readonly compressed monthly data and example accounting report emailed to responsible person. For external accounting system etc. A backup example (chmod g+rwx and chgrp mysql are needed for ~openisp/mysqlRadacct/data dir)

#
#
#mysqlRadacct
#
20 3 1 * * /cgi-bin/mysqlRadacct.cgi Extract `/bin/lastmonth` myrootpwd /var/lib/mysql/mysqlradacct > /dev/null
40 3 1 * * /cgi-bin/mysqlRadacct.cgi Report `/bin/lastmonth` myrootpwd > /tmp/acct_report.txt 2>&1; mail -s "Radius Accounting Report" accounting@openisp.net < /tmp/acct_report.txt;
##backup
20 4 * * * ISMROOT=~openisp;export ISMROOT;/cgi-bin/mysqlRadacct.cgi Backup mysqlrootpwd > /dev/null

How-to Upgrade from Previous Versions
*See new command line menu for UpdateSchema.

Permission Hints
chown openisp /var/log/radutmp
chown -R openisp /usr/local/etc/raddb