Automate closing old SCOM alerts tool


Hi,

Mark Manty Premier Field Engineer with Microsoft here with another example tool for System Center Operations Manager.

Today I have an example tool that can be used to close old SCOM alerts. For those that do not want to use command line PowerShell commands to perform these actions they can use this command line tool to save time closing alerts.

I ran this in a test environment and it does not have to run on a RMS or MS to work. It must meet the below requirements in order to run successfully:

  • .NET 3.5 Framework
  • SCOM R2 Console (User Interface installed)
  • Run as account that has administrative rights to the SCOM Management Group

Extract the files to some directory of your choice.

Open Administrative command prompt and run the CloseOldSCOMAlerts.exe scomrms 48 * Rules

Where scomrms is your root management server name. 48 is the number of hours old alerts to close. * is all alerts (can specify “Health Service” to only close alerts that have “Health Service string in the alert name). Rules specifies only to close alerts that are generated from Rules.

The first two parameters are required. If you do not specify third and fourth parameter it defaults to close all alerts (monitors and rules).

The third parameter can be used to specify a string to match on alert name to close only those that contain that string or you can specify * to close any alert.

The fourth parameter can specify “Rules”, “Monitors”, or ALL. Rules will only close alerts from rules and Monitors will close alerts only from Monitors.

Note that closing alerts that are generated from Monitors Will NOT reset the health of the monitor. It only closes the alert.

If you have an alerting rule that is used to validate alerting is working, this would be an option you could use to schedule closing of old alerts to help ensure these old alerts do not fill up your operations manager database that will impact your performance.

I hope you find this tool useful and enjoy this example tool.

 

Disclaimer:

This example is provided “AS IS” with no warranty expressed or implied. Run at your own risk. The opinions and views expressed in this blog are those of the author and do not necessarily state or reflect those of Microsoft.

CloseOldSCOMAlertsv1.zip


Comments (0)

Skip to main content