Freigeben über


Effective monitoring in SCOM

 

Occasionally, a customer requests a full list of the monitoring on a specific agent - all rules, monitors, thresholds, and overrides.  While the task called "Show Running Rules and Monitors for this Health Service" will be helpful, it does not show thresholds or overridden thresholds.

For this, you can use the PowerShell cmdlet: Export-SCOMEffectiveMonitoringConfiguration. Here's a sample script:

$Members = (Get-SCOMGroup –DisplayName "My SCOM group").GetRelatedMonitoringObjects()

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

Take a minute to understand the lines above. Look at the TechNet site for Export-SCOMEffectiveMonitoringConfiguration to understand the cmdlet's parameters, like "-RecurseContainedObjects."

I suggest testing this on a small group of agents first.  Once an agent is processed, a .csv file will appear in the path specified, "C:\thresholds\" in this example.

Once you've gotten the .csv files, you'll notice it's not very pretty - all the content is in the first column.  So to make things more usable and better looking, just do "Text to Columns" in Excel:

 

[caption id="attachment_35" align="alignnone" width="1024"]First, select the entire first column in the spreadsheet. Then, click "Text to Columns." First, select the entire first column in the spreadsheet. Then, click "Text to Columns."[/caption]

 

 

[caption id="attachment_55" align="alignnone" width="1024"]Use the pipeline character '|' as the delimiter. Use the pipeline character '|' as the delimiter.[/caption]

That's it, enjoy!  Now you can send off this spreadsheet to whoever thought they really wanted to know the details of the hundreds of monitors and rules that were running on this agent :)