MySQL / MariaDB
Auto-Discovery
Health Check
Metrics
Logs
To enable metrics gathering, credentials are required. Bleemeo agent will find the credentials if:
- MySQL or MariaDB and the agent are running on Ubuntu or Debian
- MySQL or MariaDB is running in a Docker container and root password is set through
the environment variable
MYSQL_ROOT_PASSWORDorMARIADB_ROOT_PASSWORD
If some auto-detected parameters are wrong, you can manually override them
by adding the following to /etc/glouton/conf.d/99-local.conf:
service:[...]
# For a MySQL or MariaDB running outside a container - type: "mysql" username: "USERNAME" password: "PASSWORD" address: "127.0.0.1" # If set to existing socket file, Glouton will prefer using the Unix socket to # connect and gather metric from MySQL or MariaDB. # Service check will continue to use the TCP address. metrics_unix_socket: "/var/run/mysqld/mysqld.sock" port: 3306
# For an additional MySQL or MariaDB running outside a container - type: "mysql" instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE" username: "USERNAME" password: "PASSWORD" address: "127.0.0.1" # If set to existing socket file, Glouton will prefer using the Unix socket to # connect and gather metric from MySQL or MariaDB. # Service check will continue to use the TCP address. metrics_unix_socket: "/var/run/mysqld/mysqld2.sock" port: 3307
# For a MySQL or MariaDB running in a Docker container - type: "mysql" instance: "CONTAINER_NAME" username: "USERNAME" password: "PASSWORD" address: "172.17.0.2" port: 3306Agent gathers the following metrics:
| Metric | Description |
|---|---|
| service_status: Status of MySQL or MariaDB | |
| mysql_cache_result_qcache_hits | Number of query cache hits per second |
| mysql_cache_result_qcache_inserts | Number of queries added to the query cache per second |
| mysql_cache_result_qcache_not_cached | Number of uncacheable queries per second |
| mysql_cache_result_qcache_prunes | Number of queries that were deleted from the query cache because of low memory per second |
| mysql_cache_blocksize_qcache | Number of blocks in the query cache |
| mysql_cache_free_blocks | Number of free memory blocks in the query cache |
| mysql_cache_free_memory | Number of free memory for the query cache in bytes |
| mysql_cache_size_qcache | Number of queries registered in the query cache |
| mysql_locks_immediate | Number of table locks that could be granted immediately per second |
| mysql_locks_waited | Number of table locks that could not be granted immediately per second |
| mysql_innodb_history_list_len | Size of InnoDB transaction history list |
| mysql_innodb_locked_transaction | Number of InnoDB transaction currently locked |
| mysql_octets_rx | Network traffic received from clients in bytes per second |
| mysql_octets_tx | Network traffic sent to clients in bytes per second |
| mysql_queries | Number of queries per second |
| mysql_slow_queries | Number of slow queries per second |
| mysql_threads_cached | Number of threads in the thread cache |
| mysql_threads_connected | Number of currently open connections |
| mysql_threads_running | Number of threads that are not sleeping |
| mysql_total_threads_created | Number of threads created per second |
| mysql_commands_begin | Number of “BEGIN” statement executed per second |
| mysql_commands_binlog | Number of “BINLOG” statement executed per second |
| mysql_commands_call_procedure | Number of “CALL PROCEDURE” statement executed per second |
| mysql_commands_change_master | Number of “CHANGE MASTER” statement executed per second |
| mysql_commands_change_repl_filter | Number of “CHANGE REPL FILTER” statement executed per second |
| mysql_commands_check | Number of “CHECK TABLE” statement executed per second |
| mysql_commands_checksum | Number of “CHECKSUM TABLE” statement executed per second |
| mysql_commands_commit | Number of “COMMIT” statement executed per second |
| mysql_commands_dealloc_sql | Number of “DEALLOCATE PREPARE” statement executed per second |
| mysql_commands_stmt_close | Number of “DEALLOCATE PREPARE” statement executed per second |
| mysql_commands_delete_multi | Number of “DELETE” on multiple table statement executed per second |
| mysql_commands_delete | Number of “DELETE” statement executed per second |
| mysql_commands_do | Number of “DO” statement executed per second |
| mysql_commands_execute_sql | Number of “EXECUTE” statement executed per second |
| mysql_commands_stmt_execute | Number of “EXECUTE” statement executed per second |
| mysql_commands_explain_other | Number of “EXPLAIN FOR CONNECTION” statement executed per second |
| mysql_commands_flush | Number of “FLUSH” statement executed per second |
| mysql_commands_ha_close | Number of “HA CLOSE” statement executed per second |
| mysql_commands_ha_open | Number of “HA OPEN” statement executed per second |
| mysql_commands_ha_read | Number of “HA READ” statement executed per second |
| mysql_commands_insert_select | Number of “INSERT … SELECT” statement executed per second |
| mysql_commands_insert | Number of “INSERT” statement executed per second |
| mysql_commands_kill | Number of “KILL” statement executed per second |
| mysql_commands_preload_keys | Number of “LOAD INDEX INTO CACHE” statement executed per second |
| mysql_commands_load | Number of “LOAD” statement executed per second |
| mysql_commands_lock_tables | Number of “LOCK TABLES” statement executed per second |
| mysql_commands_optimize | Number of “OPTIMIZE” statement executed per second |
| mysql_commands_prepare_sql | Number of “PREPARE” statement executed per second |
| mysql_commands_stmt_prepare | Number of “PREPARE” statement executed per second |
| mysql_commands_purge_before_date | Number of “PURGE BEFORE DATE” statement executed per second |
| mysql_commands_purge | Number of “PURGE” statement executed per second |
| mysql_commands_release_savepoint | Number of “RELEASE SAVEPOINT” statement executed per second |
| mysql_commands_repair | Number of “REPAIR” statement executed per second |
| mysql_commands_replace_select | Number of “REPLACE SELECT” statement executed per second |
| mysql_commands_replace | Number of “REPLACE” statement executed per second |
| mysql_commands_reset | Number of “RESET” statement executed per second |
| mysql_commands_resignal | Number of “RESIGNAL” statement executed per second |
| mysql_commands_rollback_to_savepoint | Number of “ROLLBACK TO SAVEPOINT” statement executed per second |
| mysql_commands_rollback | Number of “ROLLBACK” statement executed per second |
| mysql_commands_savepoint | Number of “SAVEPOINT” statement executed per second |
| mysql_commands_select | Number of “SELECT” statement executed per second |
| mysql_commands_signal | Number of “SIGNAL” statement executed per second |
| mysql_commands_slave_start | Number of “START SLAVE” statement executed per second |
| mysql_commands_group_replication_start | Number of “START” for group replication statement executed per second |
| mysql_commands_stmt_fetch | Number of “STMT FETCH” statement executed per second |
| mysql_commands_stmt_reprepare | Number of “STMT REPREPARE” statement executed per second |
| mysql_commands_stmt_reset | Number of “STMT RESET” statement executed per second |
| mysql_commands_stmt_send_long_data | Number of “STMT SEND LONG DATA” statement executed per second |
| mysql_commands_slave_stop | Number of “STOP SLAVE” statement executed per second |
| mysql_commands_group_replication_stop | Number of “STOP” for group replication statement executed per second |
| mysql_commands_truncate | Number of “TRUNCATE” statement executed per second |
| mysql_commands_unlock_tables | Number of “UNLOCK TABLES” statement executed per second |
| mysql_commands_update_multi | Number of “UPDATE” on multiple table statement executed per second |
| mysql_commands_update | Number of “UPDATE” statement executed per second |
| mysql_commands_xa_commit | Number of “XA COMMIT” statement executed per second |
| mysql_commands_xa_end | Number of “XA END” statement executed per second |
| mysql_commands_xa_prepare | Number of “XA PREPARE” statement executed per second |
| mysql_commands_xa_recover | Number of “XA RECOVER” statement executed per second |
| mysql_commands_xa_rollback | Number of “XA ROLLBACK” statement executed per second |
| mysql_commands_xa_start | Number of “XA START” statement executed per second |
| mysql_commands_assign_to_keycache | Number of assign to keycache commands per second |
| mysql_handler_commit | Number of internal commit request per second |
| mysql_handler_delete | Number of rows deleted from tables per second |
| mysql_handler_write | Number of rows inserted per second |
| mysql_handler_update | Number of rows updated per second |
| mysql_handler_rollback | Number of transaction rollback requests given to a storage engine per second |