Description
This alert will calculate the average CPU Utilization in the last X minutes based on the Ignite CPU resource metric data. The number of minutes the alert uses is based on the Execution Interval field.
The example below uses the "CPU Utilization" metric, but a very similar query can be used for other metrics as well. For example, if you wanted to monitor O/S Memory Utilization, you could modify the "where mn.NAME = 'CPU Utilization'" line to "where mn.NAME = 'Memory Utilization'". The other metric names can be retrieved from this query: select * from con_metrics_names_#DBID# -- #DBID# is the ID from select id, name from cond.
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: CPU Utilization
Execution Interval: 10 minutes
Notification Text: The following servers are experiencing high CPU utilization.
SQL Statement:
select ISNULL(AVG(md.V*1.0),-1) avg_cpu
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 = 'CPU Utilization'
and md.D >= DATEADD(MI, -#FREQUENCY#, current_timestamp)
Execute Against: Repository
Units: % CPU Utilization
High Threshold: Min 90, Max empty
Medium Threshold: Min 80, Max 90