CPU utilization alert through WMI Alert.

  • Hi Experts,

    I need a bit of suggestion here.

    Can you use the below query to get CPU high utilisation alert purposes for both named and default instance? or, do I need to make any changes here (@wmi_namespace=N'\\.\ROOT\CIMV2' ) ?

    Please suggest.

    USE [msdb]

    GO

    EXEC msdb.dbo.sp_add_alert @name=N'CPU_WM_Utilization_Check',

    @message_id=0,

    @severity=0,

    @enabled=1,

    @delay_between_responses=14400,

    @include_event_description_in=1,

    @database_name=N'',

    @notification_message=N'',

    @event_description_keyword=N'',

    @performance_condition=N'',

    @wmi_namespace=N'\\.\ROOT\CIMV2',

    @wmi_query=N'SELECT * FROM __InstanceModificationEvent WITHIN 600 WHERE TargetInstance ISA "Win32_Processor" AND TargetInstance.LoadPercentage > 90',

    @job_id=N'00000000-0000-0000-0000-000000000000';

    GO

    EXEC msdb.dbo.sp_update_notification @alert_name=N'CPU_WM_Utilization_Check', @operator_name=N'Operator', @notification_method = 1;

    GO

    Thanks.

  • Guys, any update? Advise? Thoughts? Suggestion(s)?

    Thanks.

  • SQL-DBA-01 (8/14/2015)


    Guys, any update? Advise? Thoughts? Suggestion(s)?

    Yes. Don't do CPU utilization alerts through SQL Server. Do them through Windows Server.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply