alert for metric avg. lock wait time

I would like to create an alert for the metric 'avg. lock wait time'. When above threshold, sent an email. Is this possible?
Tagged:

Answers

  • Alex BAlex B Posts: 1,157 Diamond 4
    Hi @dj_annie,

    There is not currently a built in alert for the metric 'avg. lock wait time' in SQL Monitor - please see the list of alerts.

    You could make your own custom metric and alert querying the same dmv we do to gather the information - something like this perhaps:
    SELECT cntr_value 
    FROM sys.dm_os_performance_counters 
    WHERE OBJECT_NAME = 'MSSQL$SQL2012:Locks'
    AND counter_name = 'Average Wait Time (ms)'
    AND instance_name = '_Total'
    

    You should also go to the SQL Monitor Uservoice and raise a suggestion for including alerts for other metrics or vote on one if it already exists.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.