根据您提供的查询结果,指标 [MSSQL 锁组 / 锁-Object] 的返回值 [平均等待时间] (Average Wait Time (ms))超过监控系统预设阈值[500ms]导致了告警的产生;指标本身采集是正常的,只是其返回值超过了预设阈值
1:您可以通过以下SQL查询锁等待情况
- SELECT
- der.[session_id],
- [request_id],
- percent_complete,
- estimated_completion_time/1000/60,
- con.[client_net_address],
- con.local_net_address,
- [start_time] AS '开始时间',
- [status] AS '状态',
- [command] AS '命令',
- dest.[text] AS 'sql语句',
- DB_NAME([database_id]) AS '数据库名',
- [blocking_session_id] AS '正在阻塞其他会话的会话ID',
- [wait_type] AS '等待资源类型',
- [wait_time] AS '等待时间',
- [wait_resource] AS '等待的资源',
- [reads] AS '物理读次数',
- [writes] AS '写次数',
- [logical_reads] AS '逻辑读次数',
- [row_count] AS '返回结果行数',
- [cpu_time],
- percent_complete
- FROM sys.[dm_exec_requests] AS der
- outer APPLY
- sys.[dm_exec_sql_text](der.[sql_handle]) AS dest
- left join sys.dm_exec_connections con
- on der.session_id=con.session_id
- --WHERE der.[session_id]>50 -- AND
- --DB_NAME(der.[database_id])=''
- ORDER BY [reads] DESC
复制代码
2:如果您确认该指标的返回值[平均等待时间]在此某个范围内是正常的,您可以更改监控系统指标返回值的阈值,使监控系统不产生告警
点击指标右侧的编辑按钮,在阈值栏,修改为 [平均等待时间] 大于 xxxx毫秒 并保存 (请设置一个在合理范围内的值)
如果该指标的返回值没有超过预设阈值,则监控系统不会产生告警
|