Skip to content
BleemeoBleemeo

MySQL / MariaDB

Auto-Detection
Built-in Metrics
Logs
Tutorial availableHow to use Bleemeo for a MySQL monitoring
Read the tutorial

MySQL and MariaDB are widely used open-source relational database management systems.

Glouton detects MySQL and MariaDB by their process and listening port (default: 3306).

To enable metrics gathering, credentials are required. Glouton finds them automatically if:

  • MySQL or MariaDB and the agent are running on Ubuntu or Debian
  • MySQL or MariaDB is running in a Docker container with the root password set through the environment variable MYSQL_ROOT_PASSWORD or MARIADB_ROOT_PASSWORD

If auto-detected parameters are incorrect, override them manually:

Terminal window
sudo tee /etc/glouton/conf.d/99-mysql.conf > /dev/null << 'EOF'
service:
# For a MySQL or MariaDB running outside a container
- type: "mysql"
username: "USERNAME"
password: "PASSWORD"
address: "127.0.0.1"
# If set to an existing socket file, Glouton will prefer the Unix socket
# for gathering metrics. 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"
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: 3306
EOF

Glouton automatically detects configuration changes.

MetricDescription
service_statusStatus of MySQL or MariaDB
mysql_cache_result_qcache_hitsNumber of query cache hits per second
mysql_cache_result_qcache_insertsNumber of queries added to the query cache per second
mysql_cache_result_qcache_not_cachedNumber of uncacheable queries per second
mysql_cache_result_qcache_prunesNumber of queries deleted from the query cache due to low memory per second
mysql_cache_blocksize_qcacheNumber of blocks in the query cache
mysql_cache_free_blocksNumber of free memory blocks in the query cache
mysql_cache_free_memoryFree memory for the query cache in bytes
mysql_cache_size_qcacheNumber of queries registered in the query cache
mysql_locks_immediateNumber of table locks granted immediately per second
mysql_locks_waitedNumber of table locks that required waiting per second
mysql_innodb_history_list_lenSize of the InnoDB transaction history list
mysql_innodb_locked_transactionNumber of currently locked InnoDB transactions
mysql_octets_rxNetwork traffic received from clients in bytes per second
mysql_octets_txNetwork traffic sent to clients in bytes per second
mysql_queriesNumber of queries per second
mysql_slow_queriesNumber of slow queries per second
mysql_threads_cachedNumber of threads in the thread cache
mysql_threads_connectedNumber of currently open connections
mysql_threads_runningNumber of threads that are not sleeping
mysql_total_threads_createdNumber of threads created per second
mysql_commands_beginNumber of "BEGIN" statements executed per second
mysql_commands_binlogNumber of "BINLOG" statements executed per second
mysql_commands_call_procedureNumber of "CALL PROCEDURE" statements executed per second
mysql_commands_change_masterNumber of "CHANGE MASTER" statements executed per second
mysql_commands_change_repl_filterNumber of "CHANGE REPL FILTER" statements executed per second
mysql_commands_checkNumber of "CHECK TABLE" statements executed per second
mysql_commands_checksumNumber of "CHECKSUM TABLE" statements executed per second
mysql_commands_commitNumber of "COMMIT" statements executed per second
mysql_commands_dealloc_sqlNumber of "DEALLOCATE PREPARE" statements executed per second
mysql_commands_stmt_closeNumber of "DEALLOCATE PREPARE" statements executed per second
mysql_commands_delete_multiNumber of multi-table "DELETE" statements executed per second
mysql_commands_deleteNumber of "DELETE" statements executed per second
mysql_commands_doNumber of "DO" statements executed per second
mysql_commands_execute_sqlNumber of "EXECUTE" statements executed per second
mysql_commands_stmt_executeNumber of "EXECUTE" statements executed per second
mysql_commands_explain_otherNumber of "EXPLAIN FOR CONNECTION" statements executed per second
mysql_commands_flushNumber of "FLUSH" statements executed per second
mysql_commands_ha_closeNumber of "HA CLOSE" statements executed per second
mysql_commands_ha_openNumber of "HA OPEN" statements executed per second
mysql_commands_ha_readNumber of "HA READ" statements executed per second
mysql_commands_insert_selectNumber of "INSERT ... SELECT" statements executed per second
mysql_commands_insertNumber of "INSERT" statements executed per second
mysql_commands_killNumber of "KILL" statements executed per second
mysql_commands_preload_keysNumber of "LOAD INDEX INTO CACHE" statements executed per second
mysql_commands_loadNumber of "LOAD" statements executed per second
mysql_commands_lock_tablesNumber of "LOCK TABLES" statements executed per second
mysql_commands_optimizeNumber of "OPTIMIZE" statements executed per second
mysql_commands_prepare_sqlNumber of "PREPARE" statements executed per second
mysql_commands_stmt_prepareNumber of "PREPARE" statements executed per second
mysql_commands_purge_before_dateNumber of "PURGE BEFORE DATE" statements executed per second
mysql_commands_purgeNumber of "PURGE" statements executed per second
mysql_commands_release_savepointNumber of "RELEASE SAVEPOINT" statements executed per second
mysql_commands_repairNumber of "REPAIR" statements executed per second
mysql_commands_replace_selectNumber of "REPLACE SELECT" statements executed per second
mysql_commands_replaceNumber of "REPLACE" statements executed per second
mysql_commands_resetNumber of "RESET" statements executed per second
mysql_commands_resignalNumber of "RESIGNAL" statements executed per second
mysql_commands_rollback_to_savepointNumber of "ROLLBACK TO SAVEPOINT" statements executed per second
mysql_commands_rollbackNumber of "ROLLBACK" statements executed per second
mysql_commands_savepointNumber of "SAVEPOINT" statements executed per second
mysql_commands_selectNumber of "SELECT" statements executed per second
mysql_commands_signalNumber of "SIGNAL" statements executed per second
mysql_commands_slave_startNumber of "START SLAVE" statements executed per second
mysql_commands_group_replication_startNumber of "START" for group replication statements executed per second
mysql_commands_stmt_fetchNumber of "STMT FETCH" statements executed per second
mysql_commands_stmt_reprepareNumber of "STMT REPREPARE" statements executed per second
mysql_commands_stmt_resetNumber of "STMT RESET" statements executed per second
mysql_commands_stmt_send_long_dataNumber of "STMT SEND LONG DATA" statements executed per second
mysql_commands_slave_stopNumber of "STOP SLAVE" statements executed per second
mysql_commands_group_replication_stopNumber of "STOP" for group replication statements executed per second
mysql_commands_truncateNumber of "TRUNCATE" statements executed per second
mysql_commands_unlock_tablesNumber of "UNLOCK TABLES" statements executed per second
mysql_commands_update_multiNumber of multi-table "UPDATE" statements executed per second
mysql_commands_updateNumber of "UPDATE" statements executed per second
mysql_commands_xa_commitNumber of "XA COMMIT" statements executed per second
mysql_commands_xa_endNumber of "XA END" statements executed per second
mysql_commands_xa_prepareNumber of "XA PREPARE" statements executed per second
mysql_commands_xa_recoverNumber of "XA RECOVER" statements executed per second
mysql_commands_xa_rollbackNumber of "XA ROLLBACK" statements executed per second
mysql_commands_xa_startNumber of "XA START" statements executed per second
mysql_commands_assign_to_keycacheNumber of assign-to-keycache commands per second
mysql_handler_commitNumber of internal commit requests per second
mysql_handler_deleteNumber of rows deleted from tables per second
mysql_handler_writeNumber of rows inserted per second
mysql_handler_updateNumber of rows updated per second
mysql_handler_rollbackNumber of transaction rollback requests given to a storage engine per second

Glouton collects MySQL and MariaDB logs for analysis in Bleemeo.