Changing alert priority for APC UPS rules with PowerShell
Our management packs for Microsoft SCOM use numerus rules based on SNMP traps. For instance, in the management pack for APC UPS monitoring has more than 100 rules.
Sometimes it is required to redefine the rules’ Priority. For example, it can be useful if Priority is used to send notifications by SMS or email. I’ll show you how to do it with SCUtils Monitoring for APC UPS.
First, you need to create a new management pack for our overrides.
Second, you have to specify rules that Priority will be changed. To do that, all rules for APC UPS need to be exported to csv file. Let’s save it here - C:\Temp\UPSRules.csv. Run the PowerShell script ‘ExportUPSRule.ps1’ on the management server to achieve the goal.
Third, in the csv file only rules that Priority will be changed must be kept. All other rules should be removed. Warning: don’t leave blank lines.
Forth, run the PowerShell script ‘ChangeRulePriority.ps1’ to modify Priority to the intended rules.
The script’s parameters:
- Management Server name;
- Display Name of Management Pack for overrides;
- CVS file location;
- Alert priority.
All the overrides will be saved in the management pack. Below the sample of the result:
Done.