This commit is contained in:
samber 2025-02-16 22:29:24 +00:00
parent 4a7b9b5c72
commit 12b8acb1b8

View file

@ -94,47 +94,38 @@ groups:
summary: MySQL restarted (instance {{ $labels.instance }})
description: "MySQL has just been restarted, less than one minute ago on {{ $labels.instance }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: Mysql_High_QPS
- alert: MysqlHighQps
expr: 'irate(mysql_global_status_questions[1m]) > 10000'
for: 2m
labels:
severity: info
annotations:
summary: Mysql_High_QPS (instance {{ $labels.instance }})
description: "Mysql_High_QPS on {{ $labels.instance }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
summary: MySQL High QPS (instance {{ $labels.instance }})
description: "MySQL is being overload with unusual QPS (> 10k QPS).\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: MySQL too many open files
- alert: MysqlTooManyOpenFiles
expr: 'mysql_global_status_innodb_num_open_files / mysql_global_variables_open_files_limit * 100 > 75'
for: 2m
labels:
severity: warning
annotations:
summary: MySQL too many Open files (instance {{ $labels.instance }})
description: "MySQL too many Open files,please conside increase variables open_files_limit {{ $labels.instance }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
summary: MySQL too many open files (instance {{ $labels.instance }})
description: "MySQL has too many open files, consider increase variables open_files_limit on {{ $labels.instance }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: MySQL too many connections
expr: 'sum by(instance) (mysql_info_schema_processes_by_host) / sum by(instance) (mysql_global_variables_max_connections) * 100 > 80'
for: 2m
labels:
severity: warning
annotations:
summary: MySQL too many connections (instance {{ $labels.instance }})
description: "MySQL too many connections,current connections is more than 80% {{ $labels.instance }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: MySQL InnoDB Force Recovery is enabled
- alert: MysqlInnodbForceRecoveryIsEnabled
expr: 'mysql_global_variables_innodb_force_recovery != 0'
for: 2m
labels:
severity: warning
annotations:
summary: MySQL InnoDB Force Recovery is enabled (instance {{ $labels.instance }})
description: "MySQL InnoDB Force Recovery not equal 0 {{ $labels.instance }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
description: "MySQL InnoDB force recovery is enabled on {{ $labels.instance }}\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: MySQL InnoDB history_len too long
- alert: MysqlInnodbHistory_lenTooLong
expr: 'mysql_info_schema_innodb_metrics_transaction_trx_rseg_history_len > 50000'
for: 2m
labels:
severity: warning
annotations:
summary: MySQL history_len (undo log) too long (instance {{ $labels.instance }})
description: "MySQL history_len (undo log) too long {{ $labels.instance }}.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
summary: MySQL InnoDB history_len too long (instance {{ $labels.instance }})
description: "MySQL history_len (undo log) too long on {{ $labels.instance }}\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"