• 欢迎访问VPS岛网站,国外VPS,国内VPS,国外服务器,国内服务器,服务器主机,测评及优惠码,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群

prometheus mysql rules

mysql技术 zjsylg 48次浏览 已收录 0个评论

groups:

  • name: MySQLStatsAlert
    rules:
    • alert: MySQL is down
      expr: mysql_up == 0
      for: 1m
      labels:
      severity: critical
      annotations:
      summary: "Instance {{ $labels.instance }} MySQL is down"
      description: "MySQL database is down. This requires immediate action!"
    • alert: open files high
      expr: mysql_global_status_innodb_num_open_files > (mysql_global_variables_open_files_limit) * 0.75
      for: 1m
      labels:
      severity: warning
      annotations:
      summary: "Instance {{ $labels.instance }} open files high"
      description: "Open files is high. Please consider increasing open_files_limit."
    • alert: Mysql_Too_Many_Slow_Query
      expr: rate(mysql_global_status_slow_queries[30m]) > 3
      for: 2m
      labels:
      severity: warning
      annotations:
      summary: "Instance {{ $labels.instance }} Mysql_Too_Many_Slow_Query detected"
      description: "{{$labels.instance}}: Mysql current Slow_Query Sql is more than 3 ,(current value is: {{ $value }})"
    • alert: Mysql_Deadlock
      expr: mysql_global_status_innodb_deadlocks > 0
      for: 2m
      labels:
      severity: warning
      annotations:
      summary: "Instance {{ $labels.instance }} Mysql_Deadlock detected"
      description: "Open files is high. Mysql Deadlock was found ,(current value is: {{ $value }})"
    • alert: Mysql_Too_Many_sleep_threads
      expr: mysql_global_status_threads_running / mysql_global_status_threads_connected * 100 < 30
      for: 2m
      labels:
      severity: warning
      annotations:
      summary: "{{$labels.instance}}: Mysql_Too_Many_sleep_threads detected"
      description: "{{$labels.instance}}: Mysql_sleep_threads percent is more than {{ $value }}, please clean the sleeping threads"

VPS岛 的文章和资源来自互联网,仅作为参考资料,如果有侵犯版权的资源请尽快联系站长,我们会在24h内删除有争议的资源。丨 转载请注明prometheus mysql rules
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址