SystemCenter

All about System Center Articles and Tutorials

Export list of running Rules and Monitors for SCOM Agent

Posted by on Nov 23, 2016 in PowerShell, SCOM 2012, SCOM 2016

Export list of running Rules and Monitors for SCOM Agent

Almost every SCOM Administrator must be getting this question in their organization from management or their co-workers “What’s exactly SCOM is monitoring on their servers”.

Actually they wants to know what all is being monitored for their servers through SCOM.

It’s really a valid question as the person who is investing a good amount of money to monitor their servers, should know what all Rules and Monitors are running for their monitored servers.

There are two ways we can find out the same:

1: Through Tasks pane under Agent Health State View.

2: PowerShell script.

Let’s start with the first one:

Through Tasks pane under Agent Health State View

1: Open Operations Console and click Monitoring.

2: Expand Agent Details under Operations Manager folder.

3: Click on Agent Health State.

4: Under Agent State column, select the agent for which Rules/Monitors need to be checked.

5: Under Tasks pane, click Show Running Rules and Monitors for this Health Service.

1

6: Leave the values to default and click Run button.

2

The Task should be completed within few seconds.

7: Click on Copy Text option.

3

8: Open MS Excel and past the copied text here.

That’s it, you can see all the running Rules and Monitors for selected agent. You can segregate the Rules and Monitors by Object Display Name.

4

You can achieve the same through PowerShell script as well and the output will also be much detailed.

PowerShell script

Follow below steps to export the list of running Rules and Monitors for the agent:

1: Create a group and add the agent for which list of running Rules and Monitors needs to be exported.

Ex: Group name: SCCVP_Test

5

2: Create a folder with name temp under C: drive on the Management Server on which PowerShell cmdlet will be executed.

6

3: Run below cmdlet, which will export running Rules and Monitors under C:\temp folder with the agent name:

$Members = (Get-SCOMGroup –DisplayName “SCCVP_Test”).GetRelatedMonitoringObjects()

$Members | ForEach-Object { Export-SCOMEffectiveMonitoringConfiguration –Instance $_ -Path “C:\temp\$($_.DisplayName).csv” –RecurseContainedObjects }

7

The command may take around a minute to complete and will create .CSV file under C:\temp folder with the agent name.

8

4: Open the file and format the same by selecting Text to Columns option.

5: Select Delimited option and click Next.

9

6: Separating it by using | Delimiter, click Next to continue.

10

7: Leave the options to default and click on Finish button.

11

You may get a Warning message to replace the data, just click OK button.

That’s it. The list is ready. You can see all the running Rules and Monitors with details in the sheet.

12

Hope this helps.

Submit a Comment

Your email address will not be published. Required fields are marked *