Difference between revisions of "Configuring Dedicated Log Server"

 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__FORCETOC__
 
__FORCETOC__
You can use 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.
+
=== 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.
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! 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 =====
 +
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.}}
  
=== Configuring Dedicated Log Server  ===
+
===== Downloading an SQL file =====
1. Install MariaDB 10.0 higher Database server. MySQL 5.7 or higher is also available. It doesn't matter which operating systems of the database server.
+
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.  
  
2. 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 =====
 +
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 "'''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.
  
3. Copy the SQL file into your log server(i.e. Dedicated Log server) and import it into your database by using the <code>mysql</code> command.<br>
+
{{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.}}
''Note that if the operating system of your server is the Windows system, you must run the Command Prompt as administrator.''
 
  
<pre>
+
The below picture is a part of the SQL.<br>
# mysql -u<user> -p<password> < <your_directory>/imradlog.sql
+
[[File:imradlog_sql2.png|600px]]
</pre>
 
If you successfully import the SQL file, it creates a user account, databases, and tables.  
 
  
또는 imRAD 장비에서만 접속이 가능하게 계정을 생성할 수 있습니다.
+
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> CREATE USER 'newuser'@'imRAD-IP-Address' IDENTIFIED BY 'user_password';
+
# mysql -u<user> -p<password> < <path>/imradlog.sql
mysql> GRANT type_of_permission ON database_name.table_name TO 'username'@'imRAD-IP-Address';
 
mysql> flush privileges;
 
</pre>
 
  
newuser, user-password 그리고 imRAD-IP-Address는 사용 환경에 맞게 변경하세요.
+
# mysql  -uroot -pmypaddword < c:\imradlog.sql # Windows
 
+
# mysql -uroot -pmypaddword < /home/user/imradlog.sql # linux
3. 데이터베이스 및 테이블 생성
 
환경설정 > 로그 전용 서버> 대상 로그에서 쿼리 파일(imradlog.sql)를 다운로드 하여<br> 서버로 복사 후 다음과 같이 로그 데이터베이스에 Import 합니다.<br>
 
이 멸영은 리눅스 프롬프트나 윈도우즈 cmd 환경에서 실행해야 합니다.
 
<pre>
 
mysql -unewuser -puser_password < imradlog.sql
 
 
</pre>
 
</pre>
  
5. imRAD 환경설정 > 로그 전용 서버 <br>
+
===== Configuring Connection properties =====
5-1. 로그 서버 설정
+
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.
 
 
5-2. 대상 로그 <br>
 
전송 할 로그를 사용 하도록 선택하세요.
 
  
  
모든 과정이 끝나면 해당 서비스(Logexp)는 로컬 데이터베이스의 로그를 전용 서버로 전송합니다.
+
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  [[CLI_-_Services(daemons)#Start.2C_Stop.2C_and_Restart | restart the logexp service]].

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.