diff --git a/flask-consul/units/gen_config.py b/flask-consul/units/gen_config.py index bc4ae86..a9f06f7 100644 --- a/flask-consul/units/gen_config.py +++ b/flask-consul/units/gen_config.py @@ -199,28 +199,28 @@ groups: description: "{{ $labels.group }}_{{ $labels.name }}:Mysql Connections:{{ $value | humanize }} \\n> {{ $labels.iid }}" - alert: MySQL_主从IO线程运行状态异常 - expr: mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_io_running == 0 - for: 1m - labels: - severity: critical - annotations: - description: "{{ $labels.group }}_{{ $labels.name }}:MySQL Slave IO thread not running \\n> {{ $labels.iid }}" + expr: mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_io_running == 0 + for: 1m + labels: + severity: critical + annotations: + description: "{{ $labels.group }}_{{ $labels.name }}:MySQL Slave IO thread not running \\n> {{ $labels.iid }}" - alert: MySQL_主从SQL线程运行状态异常 - expr: mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_sql_running == 0 - for: 1m - labels: - severity: critical - annotations: - description: "{{ $labels.group }}_{{ $labels.name }}:MySQL Slave SQL thread not running \\n> {{ $labels.iid }}" + expr: mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_sql_running == 0 + for: 1m + labels: + severity: critical + annotations: + description: "{{ $labels.group }}_{{ $labels.name }}:MySQL Slave SQL thread not running \\n> {{ $labels.iid }}" - alert: MySQL_主从复制延迟过高 - expr: mysql_slave_status_seconds_behind_master > 3 - for: 1m - labels: - severity: critical - annotations: - description: "{{ $labels.group }}_{{ $labels.name }}:主从复制延迟当前:{{ $value | humanize }}s \\n> {{ $labels.iid }}" + expr: mysql_slave_status_seconds_behind_master > 3 + for: 1m + labels: + severity: critical + annotations: + description: "{{ $labels.group }}_{{ $labels.name }}:主从复制延迟当前:{{ $value | humanize }}s \\n> {{ $labels.iid }}" - alert: MySQL_is_Restart expr: mysql_global_status_uptime <600