9 Replies Latest reply on Feb 10, 2015 7:32 PM by jaminsql

    Create custom alert over a custom metric


      I have recently have a couple of requrements where I have to get an alert if a particular metric is over a threshold for a particular amount of time. For example I have to track my work queue count on an instance. I know on my system that this value goes above 0 quiet frequently and doesn't turn into a problem unless this continues to stay above zero for say 10 - 15 min. I have setup a custom monitor to collect this every minute using below query.


      SELECT COUNT(1) AS work_queue

      FROM sys.dm_os_schedulers

      WHERE work_queue_count > 0


      Now I want to setup an alert by querying the collection table on ignite DB to check past 10-15 values and if they are continuously above 0 I can send an alert. The problem I am facing is how to map the Metric ID to the Metric Name easily. I have to query each data and match the values to identify the right METRICS_ID in CON_METRICS_xx tables.


      Is there a simple way to find the Metric name and get the METRICS_ID?