Quantcast
Channel: Operations Manager - General forum
Viewing all articles
Browse latest Browse all 11941

set all rules in mp or for a class to trigger warning alerts only

$
0
0

I'm looking for a way to force all rules in class or mp to trigger warnings only. Our enterprise monitoring system picks up a critical from SCOM and pages us. We want to reset everything in the mp's that we are in charge of to warn only then bump them up to critical as needed. I was able to do this at the monitor level with the ps below, but I'm not finding a method to do this at the rule level.

Any help?

PS for the monitor level:

$MP=Get-SCOMManagementPack-computernamemanagementserver|Where-Object {$_.displayname-like"*Override*"}

$Class

=Get-SCOMClass-ComputerNamemanagementserver|Where-Object {$_.displayname-like"*MP I don't want to generate criticals*"}

$Monitors

=Get-SCOMMonitor-computernamemanagementserver-Target$Class

foreach

($Monitorin$Monitors) {

if

($Monitor.AlertSettings.AlertSeverity-eq“Critical”) {

$MonitorName

=$Monitor.Name

$OverrideName

=“OV_”+$MonitorName

$MonitorOverride

=New-ObjectMicrosoft.EnterpriseManagement.Configuration.ManagementPackMonitorPropertyOverride($MP,$OverrideName)

$MonitorOverride

.Monitor=$Monitor

$MonitorOverride

.Property=“AlertSeverity”

$MonitorOverride

.Value=“Warning”

$MonitorOverride

.Context=$Class

}

}

$MP

.AcceptChanges()


Viewing all articles
Browse latest Browse all 11941

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>