Difference between revisions of "Configuring Dedicated Log Server"

 
(14 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
! Log Table !! Local Database !! Log Server !! Log name
 
! Log Table !! Local Database !! Log Server !! Log name
 
|-
 
|-
| IP/MAC address history || 3 months || 48 months || DHCP Lease
+
| IP/MAC address history || 3 months || 48 months or more || DHCP Lease
 
|-
 
|-
| RADIUS Accounting || 3 months || 48 months || RADIUS Accounting
+
| RADIUS Accounting || 3 months || 48 months or more || RADIUS Accounting
 
|-
 
|-
| RADIUS post-auth || 3 months || 48 months || RADIUS Postauth
+
| RADIUS post-auth || 3 months || 48 months or more || RADIUS Postauth
 
|-
 
|-
 
|}
 
|}
 
+
==== How to ====
==== Installing database server ====
+
===== 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.
 
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|Note that if you have already a MariaDB or MySQL server, you can use the server as a log server.}}
  
==== Downloading an SQL file ====
+
===== 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 <i class="fas fa-download"></i> icon on the top right of the "Target log" table and save it on your computer.  
 
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 <i class="fas fa-download"></i> icon on the top right of the "Target log" table and save it on your computer.  
  
==== Importing an SQL file ====
+
===== 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 <code>mysql</code> command.
 
Copy the downloaded SQL file into your log server(i.e. Dedicated Log server) and import it into your database by using the <code>mysql</code> 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.
+
If you import the SQL file, it will create a user account, databases, and tables. The default user is "'''lyonlog'''" and the password is "'''1111'''". The default password will be changed after configuring connection properties.
<pre>
+
if you are familiar with the MySQL syntax, you can also change the user and the remote access by editing lines between 27 and 30 before importing.
CREATE USER IF NOT EXISTS 'myuser'@'%' IDENTIFIED BY 'mypassword';
+
 
</pre>
+
{{note|Note that '''DO NOT CHANGE THE DEFAULT PASSWORD''' because the [[ImRAD services(daemons) | logexp]] service automatically changes the default to the new password that you specify on the "Dedicated Log server" page.}}
  
 
The below picture is a part of the SQL.<br>
 
The below picture is a part of the SQL.<br>
[[File:imradlog_sql.png|600px]]
+
[[File:imradlog_sql2.png|600px]]
  
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> should be "root" and the <password> is the password of the "root" of the database in the dedicated log server. {{note|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> < <your_directory>/imradlog.sql
+
# mysql -u<user> -p<password> < <path>/imradlog.sql
  
 
# mysql  -uroot -pmypaddword < c:\imradlog.sql # Windows
 
# mysql  -uroot -pmypaddword < c:\imradlog.sql # Windows
Line 38: Line 39:
 
</pre>
 
</pre>
  
==== Configuring Connection properties ====
+
===== Configuring Connection properties =====
 
The final step is the configuration to have a daemon(i.e. the [[ImRAD services(daemons) | logexp]]) connect to the dedicated log server.
 
The final step is the configuration to have a daemon(i.e. the [[ImRAD services(daemons) | 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 | Environment > Dedicated_Log_Server]] section.
 
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 | Environment > Dedicated_Log_Server]] section.

Latest revision as of 14:15, 14 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 "1111". The default password will be changed after configuring connection properties. if you are familiar with the MySQL syntax, you can also change the user and the remote access by editing lines between 27 and 30 before importing.

Note that DO NOT CHANGE THE DEFAULT PASSWORD because the logexp service automatically changes the default to the new password that you specify on the "Dedicated Log server" page.

The below picture is a part of the SQL.
Imradlog sql2.png

To import the SQL file, enter the mysql command. The <user> should be "root" and the <password> is the password of the "root" 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.