Disable all alerts/rules generated by management pack

Michael 81 Reputation points
2021-09-22T06:55:51.283+00:00

How do I disable all alerts generated by monitors/rules from a specific mgmt pack?

134251-udklip.png

Operations Manager
Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,499 questions
{count} votes

Accepted answer
  1. AlexZhu-MSFT 5,956 Reputation points Microsoft Vendor
    2021-09-23T03:53:26.547+00:00

    Hi,

    I've downloaded the mp bundle from systemwiki, imported it in the lab. No rule and 7 monitors are found in this management pack.

    To disable them, we can find each monitor (in Authoring pane), create an overrides and save it in an unsealed management pack.

    screenshots for your reference

    Get-SCOMManagementPack -DisplayName "pki certificate validation v2" | Get-SCOMRule
    134543-scom-disable-monitor-00.png

    disable the monitor
    134494-scom-disable-monitor-01.png

    Alex
    If the response is helpful, please click "Accept Answer" and upvote it.


2 additional answers

Sort by: Most helpful
  1. System Center guy 691 Reputation points
    2021-09-23T05:49:12.41+00:00

    Use the following powershell

    1) The Name management pack which i want to disable all its of alerts/rules is "Microsoft System Center Management Pack for Windows 10 (Monitoring)"
    2) The override is save in the MP ,'samplemp'.

    You should modify the above parameter in your PowerShell cmdlet

    $MP=get-scommanagementpack -displayname 'samplemp'
    $monitors=get-scommanagementpack -displayname 'Microsoft System Center Management Pack for Windows 10 (Monitoring)'|get-scommonitor
    foreach ($monitor in $monitors) {
    Disable-SCOMMonitor -ManagementPack $MP -Monitor $Monitor -Enforce
    }

    $rules=get-scommanagementpack -displayname 'Microsoft System Center Management Pack for Windows 10 (Monitoring)'|get-scomrule
    foreach ($rule in $rules) {
    Disable-SCOMRule -ManagementPack $MP -Rule $Rule -Enforce
    }

    Roger

    2 people found this answer helpful.

  2. AlexZhu-MSFT 5,956 Reputation points Microsoft Vendor
    2021-09-24T07:15:23.973+00:00

    Hi,

    Yes, the cmdlet will output all the rules/monitors in the specified (sealed) management pack. If the number is small (in above example, only 7 monitors), we can disable it (via overrides) manually. If the number is larger, we can use Roger's excellent script to automate the process.

    $MP = get-scommanagementpack -displayname 'pa'  
    $monitors = Get-SCOMManagementPack -DisplayName "pki certificate validation v2" | Get-SCOMMonitor  
    foreach ($monitor in $monitors)   
    {  
     Disable-SCOMMonitor -ManagementPack $MP -Monitor $Monitor -Enforce  
    }  
      
    

    quick lab test screenshot:

    134926-scom-disable-monitor-02.png

    Alex
    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.