Line 33: | Line 33: | ||
To import the SQL file, enter the <code>mysql</code> command. the <user> and <password> is the existing account of the database in the dedicated log server. ''Note that if the operating system of your server is the Microsoft Windows, you must run the Command Prompt as administrator.'' | To import the SQL file, enter the <code>mysql</code> command. the <user> and <password> is the existing account of the database in the dedicated log server. ''Note that if the operating system of your server is the Microsoft Windows, you must run the Command Prompt as administrator.'' | ||
<pre> | <pre> | ||
− | # mysql -u<user> -p<password> < < | + | # mysql -u<user> -p<password> < <path>/imradlog.sql |
# mysql -uroot -pmypaddword < c:\imradlog.sql # Windows | # mysql -uroot -pmypaddword < c:\imradlog.sql # Windows |
Revision as of 17:04, 12 May 2021
Dedicated Log Server
You can operate a dedicated Log Server that can store more logs than the imRAD local database. If you configure it, the management interface reads logs from the dedicated Log Server and displays them.
Log Table | Local Database | Log Server | Log name |
---|---|---|---|
IP/MAC address history | 3 months | 48 months or more | DHCP Lease |
RADIUS Accounting | 3 months | 48 months or more | RADIUS Accounting |
RADIUS post-auth | 3 months | 48 months or more | RADIUS Postauth |
How to
Installing database server
Install MariaDB 10.0 or higher Database server on your server. MySQL 5.7 or higher is also available. It doesn't matter which operating systems of the database server. Note that if you have already a MariaDB or MySQL server, you can use the server as a log server.
Downloading an SQL file
Open the "Dedicated Log server" page that is located in the "Environment" menu of the management interface. And then, download an SQL file by clicking the icon on the top right of the "Target log" table and save it on your computer.
Importing an SQL file
Copy the downloaded SQL file into your log server(i.e. Dedicated Log server) and import it into your database by using the mysql
command.
If you import the SQL file, it will create a user account, databases, and tables. The default user is "lyonlog" and the password is "sxdtLy@log24". if you want to change the user or password before importing the SQL file, modify the query of line 27 after opening the download file by using an editor such as notepad or vi. For example, a new query might be changed like the below.
CREATE USER IF NOT EXISTS 'myuser'@'%' IDENTIFIED BY 'mypassword';
The below picture is a part of the SQL.
To import the SQL file, enter the mysql
command. the <user> and <password> is the existing account of the database in the dedicated log server. Note that if the operating system of your server is the Microsoft Windows, you must run the Command Prompt as administrator.
# mysql -u<user> -p<password> < <path>/imradlog.sql # mysql -uroot -pmypaddword < c:\imradlog.sql # Windows # mysql -uroot -pmypaddword < /home/user/imradlog.sql # linux
Configuring Connection properties
The final step is the configuration to have a daemon(i.e. the logexp) connect to the dedicated log server. Open the "Dedicated Log server" page that is located in the "Environment" menu of the management interface and switch on the "Log Server". And then, you can see several forms to configure the connection properties. For more about the items, please refer to the Environment > Dedicated_Log_Server section.
The logexp service automatically reads the connection properties and copies local logs to your log server. If the "Last SQL Datetime" or the "Last Connection Datetime" is not updated in the "Dedicated Log server" page for several minutes, you need to restart the logexp service.