302 lines
7.6 KiB
JSON
302 lines
7.6 KiB
JSON
[
|
||
{
|
||
"name": "MysqlInnodbLogWaits",
|
||
"note": "MySQL innodb log writes stalling",
|
||
"severity": 2,
|
||
"disabled": 0,
|
||
"prom_for_duration": 0,
|
||
"prom_ql": "rate(mysql_global_status_innodb_log_waits[15m]) > 10",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlInnodbLogWaits"
|
||
]
|
||
},
|
||
{
|
||
"name": "MysqlSlaveIoThreadNotRunning",
|
||
"note": "MySQL Slave IO thread not running",
|
||
"severity": 1,
|
||
"disabled": 0,
|
||
"prom_for_duration": 0,
|
||
"prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_io_running == 0",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlSlaveIoThreadNotRunning"
|
||
]
|
||
},
|
||
{
|
||
"name": "MysqlSlaveReplicationLag",
|
||
"note": "",
|
||
"severity": 1,
|
||
"disabled": 0,
|
||
"prom_for_duration": 60,
|
||
"prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) (mysql_slave_status_seconds_behind_master - mysql_slave_status_sql_delay) > 30",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlSlaveReplicationLag"
|
||
]
|
||
},
|
||
{
|
||
"name": "MysqlSlaveSqlThreadNotRunning",
|
||
"note": "MySQL Slave SQL thread not running",
|
||
"severity": 1,
|
||
"disabled": 0,
|
||
"prom_for_duration": 0,
|
||
"prom_ql": "mysql_slave_status_master_server_id > 0 and ON (instance) mysql_slave_status_slave_sql_running == 0",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlSlaveSqlThreadNotRunning"
|
||
]
|
||
},
|
||
{
|
||
"name": "Mysql刚刚有重启,请注意",
|
||
"note": "MySQL has just been restarted, less than one minute ago",
|
||
"severity": 3,
|
||
"disabled": 0,
|
||
"prom_for_duration": 0,
|
||
"prom_ql": "mysql_global_status_uptime < 60",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlRestarted"
|
||
]
|
||
},
|
||
{
|
||
"name": "Mysql实例挂了",
|
||
"note": "",
|
||
"severity": 1,
|
||
"disabled": 0,
|
||
"prom_for_duration": 0,
|
||
"prom_ql": "mysql_up == 0",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlDown"
|
||
]
|
||
},
|
||
{
|
||
"name": "Mysql打开了很多文件句柄,请注意",
|
||
"note": "More than 80% of MySQL files open",
|
||
"severity": 2,
|
||
"disabled": 0,
|
||
"prom_for_duration": 120,
|
||
"prom_ql": "avg by (instance) (mysql_global_status_innodb_num_open_files) / avg by (instance)(mysql_global_variables_open_files_limit) * 100 > 80",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlHighOpenFiles"
|
||
]
|
||
},
|
||
{
|
||
"name": "Mysql最近一分钟有慢查询出现",
|
||
"note": "MySQL server mysql has some new slow query",
|
||
"severity": 2,
|
||
"disabled": 0,
|
||
"prom_for_duration": 120,
|
||
"prom_ql": "increase(mysql_global_status_slow_queries[1m]) > 0",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlSlowQueries"
|
||
]
|
||
},
|
||
{
|
||
"name": "Mysql有超过60%的连接是running状态",
|
||
"note": "",
|
||
"severity": 2,
|
||
"disabled": 0,
|
||
"prom_for_duration": 120,
|
||
"prom_ql": "avg by (instance) (mysql_global_status_threads_running) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 60",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlHighThreadsRunning"
|
||
]
|
||
},
|
||
{
|
||
"name": "Mysql连接数已超过80%",
|
||
"note": "More than 80% of MySQL connections are in use",
|
||
"severity": 2,
|
||
"disabled": 0,
|
||
"prom_for_duration": 120,
|
||
"prom_ql": "avg by (instance) (mysql_global_status_threads_connected) / avg by (instance) (mysql_global_variables_max_connections) * 100 > 80",
|
||
"prom_eval_interval": 15,
|
||
"enable_stime": "00:00",
|
||
"enable_etime": "23:59",
|
||
"enable_days_of_week": [
|
||
"1",
|
||
"2",
|
||
"3",
|
||
"4",
|
||
"5",
|
||
"6",
|
||
"0"
|
||
],
|
||
"enable_in_bg": 0,
|
||
"notify_recovered": 1,
|
||
"notify_channels": [],
|
||
"notify_repeat_step": 60,
|
||
"recover_duration": 0,
|
||
"callbacks": [],
|
||
"runbook_url": "",
|
||
"append_tags": [
|
||
"alertname=MysqlTooManyConnections"
|
||
]
|
||
}
|
||
] |