Menu

1- Setup DB

Joe McManus

The first step in using the Log Analysis Tool Kit (LATK) is to create a database. A script is included with LATK to do this.

latk-createdb.py

giskard:logs joe$ ./latk-createdb.py
OK: Created database LogAnalysisToolKit
OK: Created created tables

By default the tools use a local MySQL Server and the user root with no password, you will need to edit the file latk-mysql.conf to match your environment.

[mysql]
user = root
pass =
host = localhost
dbName = LogAnalysisToolKit
dbSock = /var/lib/mysql/mysql.sock

You can tune the MySQL database for better performance. On the MySQL server edit the my.cnf file, usually located in /etc. Variables to look at are, key_buffer_size sort_buffer, max_heap_table_size sort_buffer_size, innodb_log_file_size, innofb_log_buffer_size. Some example are below.

key_buffer_size=256M
sort_buffer= 64M
max_heap_table_size= 1G
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 128M
read_buffer_size = 129M
query_cache_size= 32
thread_concurrency = 4innodb_buffer_pool_size = 4G
innodb_additional_mem_pool_size = 256M
innodb_log_file_size = 1G
innodb_log_buffer_size = 256M