问题一: 对 mysql 那些指标进行监控
-
功能性
-
image
-
问题二: 这些监控是如何来实现的
-
QPS:
image
-
TPS:
image
-
监控慢查询:
image
-
监控死锁:
image
-
监控阻塞:
image
-
监控数据库可用性:
image
-
监控主从的状态:
image
-
监控主从延时:
image
-
监控主从延时的心跳检测命令:
image
-
并发数:
show global status like 'Threads_running';
-
连接数:
show global status like 'Threads_connected';
- 报警:
Threads_connected / max_connections > 0.8
- 报警:
-
InnoDB 缓存命中率
- 数据来自 global 变量中, show global status like 'innodb_buffer_pool_read%';
image
网友评论