mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-21 17:07:24 +08:00
Reorder mysql metrics in alerts (#323)
Was graphing the server ID instead of the values for io running, sql running, and lag. Co-authored-by: Todd Lyons <todd.lyons@appetize.com>
This commit is contained in:
parent
abde89f88b
commit
85a9cc8e21
1 changed files with 3 additions and 3 deletions
6
dist/rules/mysql/mysqld-exporter.yml
vendored
6
dist/rules/mysql/mysqld-exporter.yml
vendored
|
|
@ -32,7 +32,7 @@ groups:
|
|||
description: "More than 60% of MySQL connections are in running state on {{ $labels.instance }}\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
||||
|
||||
- alert: MysqlSlaveIoThreadNotRunning
|
||||
expr: 'mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_io_running == 0'
|
||||
expr: '( mysql_slave_status_slave_io_running and ON (instance) mysql_slave_status_master_server_id > 0 ) == 0'
|
||||
for: 0m
|
||||
labels:
|
||||
severity: critical
|
||||
|
|
@ -41,7 +41,7 @@ groups:
|
|||
description: "MySQL Slave IO thread not running on {{ $labels.instance }}\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
||||
|
||||
- alert: MysqlSlaveSqlThreadNotRunning
|
||||
expr: 'mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_sql_running == 0'
|
||||
expr: '( mysql_slave_status_slave_sql_running and ON (instance) mysql_slave_status_master_server_id > 0) == 0'
|
||||
for: 0m
|
||||
labels:
|
||||
severity: critical
|
||||
|
|
@ -50,7 +50,7 @@ groups:
|
|||
description: "MySQL Slave SQL thread not running on {{ $labels.instance }}\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
||||
|
||||
- alert: MysqlSlaveReplicationLag
|
||||
expr: 'mysql_slave_status_master_server_id > 0 and ON (instance) (mysql_slave_status_seconds_behind_master - mysql_slave_status_sql_delay) > 30'
|
||||
expr: '( (mysql_slave_status_seconds_behind_master - mysql_slave_status_sql_delay) and ON (instance) mysql_slave_status_master_server_id > 0 ) > 30'
|
||||
for: 1m
|
||||
labels:
|
||||
severity: critical
|
||||
|
|
|
|||
Loading…
Reference in a new issue