Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
Nicola Strappazzon C edited this page Oct 27, 2023 · 1 revision

User

Create a monitor user to allow access to zenit to collect metrics.

CREATE USER monitor@'%' IDENTIFIED by 'monitor';
ALTER USER monitor@'%' WITH MAX_USER_CONNECTIONS 5;
GRANT REPLICATION CLIENT ON *.* TO monitor@'%';
GRANT PROCESS ON *.* TO monitor@'%';
GRANT SELECT ON *.* TO monitor@'%';

Please, change password.

Audit Log

  • audit_log_rotate_on_size=1G
  • audit_log_rotations=2
  • audit_log_exclude_accounts='monitor@%,monitor@localhost'

Slow Log

List of related variables for the slow query log and light different between MySQL, Percona and MariaDB, please check the official documentation to more details and compatibility:

Variable Value MySQL Percona MariaDB Description
log_output FILE Yes Yes Yes How the output will be written
log_queries_not_using_indexes on Yes Yes Yes Whether to log queries that don't use indexes
log_slow_admin_statements on No Yes Yes Whether to log certain admin statements
log_slow_rate_limit 1 No Yes Yes Permits a fraction of slow queries to be logged
log_slow_rate_type query No Yes
log_slow_slave_statements on No Yes Log slow statements executed by slave thread
log_slow_verbosity full No Yes Amount of detail in the log
long_query_time 0 Yes Yes Yes Time in seconds/microseconds defining a slow query
min_examined_row_limit on Yes Yes Yes Minimum rows a query must examine to be slow
slow_query_log on Yes Yes Yes Enable/disable the slow query log
slow_query_log_always_write_time 1 No Yes
slow_query_log_file Yes Yes Yes Name of the slow query log file
slow_query_log_use_global_control all No Yes
Clone this wiki locally