⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rlm_sql_log.5

📁 使用最广泛的radius的linux的源码
💻 5
字号:
.\"     # DS - begin display.de DS.RS.nf.sp...\"     # DE - end display.de DE.fi.RE.sp...TH rlm_sql_log 5 "28 May 2005" "" "FreeRADIUS Module".SH NAMErlm_sql_log \- FreeRADIUS Module.SH DESCRIPTIONThe \fBrlm_sql_log\fP module appends the SQL queries in a log filewhich is read later by the scripts/radsqlrelay Perl program..PPThe purpose of this module is to de-couple the storage of long-termaccounting data in SQL from "live" information needed by the RADIUSserver as it's running.  If you are not using SQL for simultaneouslogin restrictions (i.e. "sql" is not listed in the "session" sectionof "radiusd.conf"), then this module allows you to log SQL queries toa file, and then process them at your leisure..PPThe benefit of this approach is that for a busy server, the overheadof performing SQL qeuries may be significant.  Also, if the SQLdatabases are large (as is typical for ones storing months of data),the INSERTs and UPDATEs may take a relatively long time.  Rather thanslowing down the RADIUS server by having it interact with a database,you can just log the queries to a file, and then run those queries onanother machine, or at a time when the RADIUS server is typicallylightly loaded..PPIf the "sql" module is listed in the "session" section of"radiusd.conf", then a similar system can still be used.  In thatcase, one database would be used to maintain "live" sessioninformation.  That database would be small, fast, and informationwould be deleted from it when a user logs out.  A second databasewould store long-term accounting information, as described above..SH LIMITATIONSThis module only performs the dynamic expansion of the variables foundin the SQL statements. No operation is executed on the database server.(this would be done later by an external program) That means the moduleis useful only with non-"SELECT" statements..SH CONFIGURATIONThe main configuration items to be aware of are the path of the logfile and the different SQL queries..IP "path"An entry named "path" sets the full path of the file where the SQLqueries are recorded. (this variable is run through dynamic stringexpansion, and can include FreeRADIUS variables to create a dynamicfilename).IP "Accounting queries"When a accounting record is processed, the module searches a configentry keyed by the Acct-Status-Type attribute present in thepacket. For example, the SQL to be run on an accounting start must benamed "Start" in the configuration for the module. Other usual valuesfor Acct-Status-Type are "Stop", "Alive", "Accounting-On", etc.  Seethe VALUEs for Acct-Status-Type in the dictionary.rfc2866 file..IP "Post-Auth query"An entry named "Post-Auth" sets the query to run during thepost-authentication stage.  This query is mainly used to log sessionswhere there may not be a later accounting packet..PP.DSmodules {  ....br  sql_log {.br    path = "${radacctdir}/sql-relay".br    acct_table = "radacct".br    postauth_table = "radpostauth".br    sql_user_name = "%{%{User-Name}:-DEFAULT}".br.br    Start = "INSERT INTO ${acct_table} ...".br    Stop = "UPDATE ${acct_table} SET ...".br    Alive = "UPDATE ${acct_table} SET ...".br.br    Post-Auth = "INSERT INTO ${postauth_table} ...".br  }.br  ....br}.braccounting {  ....br  sql_log  ....br}.br.brpost-auth {  ....br  sql_log  ....br}.DE.SH SECTIONS.BR accounting,.BR post-auth.SH FILES.I /etc/raddb/radiusd.conf.SH SEE ALSO.BR radsqlrelay (8),.BR radiusd (8),.BR radiusd.conf (5).SH AUTHORNicolas Baradakis <nicolas.baradakis@cegetel.net>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -