6. 6/21
Audit Log 機制
Audit log
files (XML)
DB name :
audit_information Audit row
data files
1. Audit log rotate
2. Parsing and converting
3. Importing data to DB
MySQL
DB Server
4. Move audit log
files to archive
Backup
Server
10. 10/21
Audit Log 入庫
程式名稱
audit_log_parsing.pl
程式參數設定
DB name
主機IP
連接埠
DB連線帳號
DB連線密碼
MySQL 安裝路徑
MySQL Data Dir
備份伺服器IP
Audit Log備份路徑
執行程式當下所在路徑
欄位資料間的分隔符號
欄位資料的前後字元
18. 18/21
參數說明
audit_log_buffer_size
Default 值: 1048576 bytes
單位: bytes
audit_log_file
檔名: audit.log
可自訂檔案路徑
audit_log_flush
值=1時, the audit log plugin closes and reopens its log file to
flush it.
If audit_log_rotate_on_size is greater than 0, setting
audit_log_flush has no effect.
19. 19/21
參數說明
audit_log_policy
ALL: Log all events
NONE:Log nothing
LOGINS:Log only login events
QUERIES:Log only query events
audit_log_strategy
ASYNCHRONOUS:Log asynchronously, wait for space in
output buffer
PERFORMANCE:Log asynchronously, drop request if
insufficient space in output buffer
SEMISYNCHRONOUS:Log synchronously, permit caching by
operating system
建議值=ASYNCHRONOUS