可视化和监控解决方案
可视化和监控解决方案  /  监控 MySQL
MySQL logo

使用 Grafana 轻松监控 MySQL

使用 Grafana Cloud 的开箱即用监控解决方案,轻松监控您的 MySQL 部署,这是流行的开源数据管理系统。Grafana Cloud 的永久免费层包括 3 个用户和最多 10k 个指标系列,以满足您的监控需求。

Grafana Cloud 的 MySQL 集成

Grafana Cloud 的 MySQL 集成 可实现对 MySQL 数据库的强大监控,其中包括预先配置的仪表盘和警报,用于跟踪性能指标,例如查询响应时间、连接使用情况和错误率。此集成可以帮助您有效地识别和解决数据库问题,从而提高 MySQL 实例的整体可靠性和性能。

集成需要运行的 MySQL 实例、用户和密码。支持的版本包括

  • MySQL >= 5.6
  • MariaDB >= 10.2

MySQL 的可观测性信号

MySQL overview
MySQL 概览
MySQL logs
MySQL 日志
Example dashboard to monitor MySQL

包含的关键指标

instance:mysql_heartbeat_lag_seconds
instance:mysql_slave_lag_seconds
mysql_global_status_aborted_clients
mysql_global_status_aborted_connects
mysql_global_status_binlog_cache_disk_use
mysql_global_status_binlog_cache_use
mysql_global_status_binlog_stmt_cache_disk_use
mysql_global_status_binlog_stmt_cache_use
mysql_global_status_buffer_pool_pages
mysql_global_status_bytes_received
mysql_global_status_bytes_sent
mysql_global_status_commands_total
mysql_global_status_connections
mysql_global_status_created_tmp_disk_tables
mysql_global_status_created_tmp_files
mysql_global_status_created_tmp_tables
mysql_global_status_handlers_total
mysql_global_status_innodb_buffer_pool_bytes_data
mysql_global_status_innodb_data_read
mysql_global_status_innodb_data_written
mysql_global_status_innodb_log_waits
mysql_global_status_innodb_mem_adaptive_hash
mysql_global_status_innodb_mem_dictionary
mysql_global_status_innodb_num_open_files
mysql_global_status_innodb_page_size
mysql_global_status_innodb_pages_written
mysql_global_status_key_blocks_unused
mysql_global_status_key_blocks_used
mysql_global_status_max_used_connections
mysql_global_status_open_files
mysql_global_status_open_table_definitions
mysql_global_status_open_tables
mysql_global_status_opened_files
mysql_global_status_opened_table_definitions
mysql_global_status_opened_tables
mysql_global_status_qcache_free_memory
mysql_global_status_qcache_hits
mysql_global_status_qcache_inserts
mysql_global_status_qcache_lowmem_prunes
mysql_global_status_qcache_not_cached
mysql_global_status_qcache_queries_in_cache
mysql_global_status_queries
mysql_global_status_questions
mysql_global_status_select_full_join
mysql_global_status_select_full_range_join
mysql_global_status_select_range
mysql_global_status_select_range_check
mysql_global_status_select_scan
mysql_global_status_slow_queries
mysql_global_status_sort_merge_passes
mysql_global_status_sort_range
mysql_global_status_sort_rows
mysql_global_status_sort_scan
mysql_global_status_table_locks_immediate
mysql_global_status_table_locks_waited
mysql_global_status_table_open_cache_hits
mysql_global_status_table_open_cache_misses
mysql_global_status_table_open_cache_overflows
mysql_global_status_threads_cached
mysql_global_status_threads_connected
mysql_global_status_threads_created
mysql_global_status_threads_running
mysql_global_status_uptime
mysql_global_status_wsrep_local_recv_queue
mysql_global_status_wsrep_local_state
mysql_global_status_wsrep_ready
mysql_global_variables_innodb_additional_mem_pool_size
mysql_global_variables_innodb_buffer_pool_size
mysql_global_variables_innodb_log_buffer_size
mysql_global_variables_key_buffer_size
mysql_global_variables_max_connections
mysql_global_variables_open_files_limit
mysql_global_variables_query_cache_size
mysql_global_variables_table_definition_cache
mysql_global_variables_table_open_cache
mysql_global_variables_thread_cache_size
mysql_global_variables_tokudb_cache_size
mysql_global_variables_wsrep_desync
mysql_heartbeat_now_timestamp_seconds
mysql_heartbeat_stored_timestamp_seconds
mysql_info_schema_processlist_threads
mysql_slave_status_seconds_behind_master
mysql_slave_status_slave_io_running
mysql_slave_status_slave_sql_running
mysql_slave_status_sql_delay
mysql_up
up

包含的关键警报规则

MySQLDown (严重)
MySQLGaleraDonorFallingBehind (警告)
MySQLGaleraNotReady (警告)
MySQLGaleraOutOfSync (警告)
MySQLHeartbeatLag (严重)
MySQLInnoDBLogWaits (警告)
MySQLInsufficientBinLogCacheSize (警告)
MySQLInsufficientBinLogStmtCacheSize (警告)
MySQLInsufficientTempTableSize (警告)
MySQLReplicationLag (严重)
MySQLReplicationNotRunning (严重)
MySQLRestarted (严重)
MySQLSlaveBehindMaster (警告)
MySQLSlowQueries (警告)
MySQLTuneThreadCacheSize (警告)