I had been very busy lately so this blog has been quite for few days, but now I would like to provide a custom OMS solution. My goal was to build a solution which shows you the effective configuration of a monitor or rule, based on a group of objects in SCOM. I created two parts, one is a PowerShell module to collect all the data from your SCOM management server and ingest it into your OMS workspace. For visualizing the data I created a OMS view which looks like this…
How does it work? Great question, so let’s start with the data collection.
SendEffectiveConfiguration PowerShell Module
I published the module on PowerShell gallery, which you can find here.
The module supports the following parameters:
This parameter accepts any existing group in SCOM, that contains objects. E.g. Windows Server 2012 Computer Group.
Set your SCOM management server here.
CustomerID is the workspace id where you want to analyze your data.
SharedKey ist the primary key for the corresponding workspace.
So the command executed would look like this:
Send-EffectiveConfiguration -GroupDisplayName “Windows Server 2012 Computer Group” -ManagementServer SCOM -CustomerId [WorkspaceID] -SharedKey [PrimaryKey] –verbose
During the collection of data you will see the output of the corresponding workflows (verbose output)…
Make sure you have the SCOM console installed on the machine where your are executing the module. Of course you need also permission to do so.
OMS Custom Logs
After you have sent the data to OMS you will find custom fields (it will take a moment to populate in OMS)….
As well as two different custom logs…
These logs contain the effective configuration for each workflow of the corresponding rule or monitor . This means, you will see the default value and the effective setting for the rules and monitors.
One entry looks like this…
The properties which have a “_D” are the out-of-the-box “Default” values. “_E” shows you the overridden value meaning the “Effective” setting for that specific rule or monitor. In addition there are other information for that rule:
Class which this workflow is targeted at.
Object which is executing this workflow.
Friendly name of the rule.
If the rule has been overridden or not.
The same properties are available for monitors.
OMS Custom View
Based on the custom log data, I created some views. The overview tile shows you the amount of overridden rules and monitors in total.
There are 3 main views…
This shows you the overridden rules and monitors since last data upload – 1 day. I assumed you might upload data on day x from different objects than on day y, so you get just the data from the past (upload) day.
Overview of all rules overridden in your environment.
Overview of all monitor overridden in your environment.
…and some other useful views, like……
- DATA AMOUNT
Data amount shows you the data upload of rule and monitor data (count). It helps to see when last upload happened and how much.
I tried so provide some useful queries based on the data.
Of course you can write your own queries based on the collected data to analyze any further.
There are two steps to deploy the solution. First login with your Azure account into the Azure portal. Then go to Github and click “Deploy to Azure” button…
…next install the PowerShell module and execute it as described above. If you want you could schedule it on a regular base.
Be aware that running the module stresses your environment heavily, so run the module during off-peak hours or during the night. In addition, do not put too many objects into the SCOM group, because it will analyze every workflow running on every object. Use it on your own risk :). For me it is just a sample project, because I wanted to try to build ARM templates and test how the OMS parts fit together. I might develop it any further, it may help you as well. I hope you like it!