<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Oct 20, 2013 at 10:19 AM, Scott Pettit - Vorco <span dir="ltr"><<a href="mailto:SPettit@vorco.net" target="_blank">SPettit@vorco.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br>
<br>
Running FreeRADIUS Version 2.1.10.<br>
<br>
I have a happily working FreeRADIUS + mySQL backend setup, however in the<br>
radacct table it seems FreeRADIUS just dumps fields in the order of what<br>
it has.<br>
<br></blockquote><div><br></div><div>The default setup doesn't do that</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
For example I store nastxspeed and nasrxspeed and disccauseext.<br>
<br></blockquote><div><br></div><div>It's not in the default setup. Someone modified that.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Some sessions end and store the tx speed, rx speed and cause in the<br>
correct field, but other sessions I end up with the remote-id in the tx<br>
speed field, then tx speed in the rx field, rx speed in the disccauseext<br>
field.<br>
<br></blockquote><div><br></div><div>Someone modified both the schemas and queries, and they messed up your config.</div><div><br></div><div>A correct sql query (e.g. in sql/mysql/dialup.conf) would look like this (taken from the default)</div>
<div><br></div><div><div> accounting_stop_query_alt = " \</div><div> INSERT INTO ${acct_table2} \</div><div> (acctsessionid, acctuniqueid, username, \</div><div> realm, nasipaddress, nasportid, \</div>
<div> nasporttype, acctstarttime, acctstoptime, \</div><div> acctsessiontime, acctauthentic, connectinfo_start, \</div><div> connectinfo_stop, acctinputoctets, acctoutputoctets, \</div>
<div> calledstationid, callingstationid, acctterminatecause, \</div><div> servicetype, framedprotocol, framedipaddress, \</div><div> acctstartdelay, acctstopdelay) \</div><div> VALUES \</div>
<div> ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \</div><div> '%{SQL-User-Name}', \</div><div> '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', \</div>
<div> '%{NAS-Port-Type}', \</div><div> DATE_SUB('%S', \</div><div> INTERVAL (%{%{Acct-Session-Time}:-0} + \</div><div> %{%{Acct-Delay-Time}:-0}) SECOND), \</div>
<div> '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '', \</div><div> '%{Connect-Info}', \</div><div> '%{%{Acct-Input-Gigawords}:-0}' << 32 | \</div>
<div> '%{%{Acct-Input-Octets}:-0}', \</div><div> '%{%{Acct-Output-Gigawords}:-0}' << 32 | \</div><div> '%{%{Acct-Output-Octets}:-0}', \</div><div> '%{Called-Station-Id}', '%{Calling-Station-Id}', \</div>
<div> '%{Acct-Terminate-Cause}', \</div><div> '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \</div><div> '0', '%{%{Acct-Delay-Time}:-0}')"</div>
<div><br></div></div><div><br></div><div>What does your queries look like? For example, is it possible that you ommit field names in the queries? (e.g INSERT INTO ${acct_table2} VALUES ...)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Is this something I can fix by getting FreeRADIUS to somehow explicitly<br>
put each attribute in the appropriate field?<br>
<br></blockquote><div><br></div><div>Get someone who understands sql to write the queries.</div><div><br></div><div>-- </div><div>Fajar</div></div></div></div>