Quantcast
Channel: THWACK: All Content - All Communities
Viewing all articles
Browse latest Browse all 20202

Custom Alert - Deadlocks

$
0
0

Description

This alert will notify when a deadlock occurs. It uses data collected from the Deadlocks custom metric (based on system_health extended event), which must be added first and described here: Deadlocks Custom Metric.

 

Alert Definition

To create the alert, click on Alerts > Manage Alerts tab and create a Custom Alert of type Custom SQL Alert - Single Numeric Return. Configure the alert with values similar to these:

 

Alert Name: Deadlocks

 

Execution Interval: 10 minutes

 

Notification Text: The following Ignite alert means deadlocks have exceeded a threshold as defined.

 

SQL Statement:

 

Note:The where clause below should be modified to look for data from the correct custom metric. To find out the name of the Deadlocks custom metric in your system, click on Options > Custom Resource Metrics and choose the Deadlocks metric. In the upper right hand corner of the next page you will see the metric name listed. Use that name in the where clause below.

 

select coalesce(sum(coalesce(md.v,0)),0) num_deadlocks

from CON_METRICS_NAMES_#DBID# mn

inner join CON_METRICS_#DBID# m on m.METRIC_NAME_ID = mn.ID

inner join CON_METRICS_DETAIL_#DBID# md on m.ID = md.METRICS_ID

where mn.NAME = 'CustomMetric-2'

and md.D >= CURRENT_TIMESTAMP - (#FREQUENCY# / 1440.0)

 

Execute Against: Repository

 

Units: Number of Deadlocks

 

High Threshold: Min 1, Max empty


Viewing all articles
Browse latest Browse all 20202

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>