Create a SQL Server WMI alert (CPU Workload)
In this example, we will create an alert in sql server to be notified when a CPU average workload is 90% within a minute
- In Object Explorer, expand SQL Server Agent, right-click Alerts, and then click New Alert.
- In the New Alert dialog box, add a new alert with the properties in the following table.
- Configure the alert as below :
Name: SQL Performance CPU alert
Type: WMI event Alert
Namespace: \\.\ROOT\CIMV2
Query: SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA “Win32_Processor” AND TargetInstance.LoadPercentage > 90
- In The Response Panel select the Notify operators check box, and then select the E-mail check box for the Operator_Admin operator
- On the Options page, select the E-mail check box, in the Additional notification message to send box, type Warning: The Average CPU workload has exceeded 90% on the instance NamedInstance, and then click OK
Comments
Post a Comment