TIDB如何监控慢查询数量并进行告警

【TiDB 版本】
v4.0.8
【问题描述】
TIDB如何监控慢查询数量并进行告警,不知道prometheus里面如何设置

hi,你可以参考 https://docs.pingcap.com/zh/tidb/stable/alert-rules,你可以参考 TiDB_query_duration 这个告警规则,通过设置 prometheus 来增加告警 https://yunlzheng.gitbook.io/prometheus-book/parti-prometheus-ji-chu/alert/prometheus-alert-rule