Authoring Azure Operational Insights Configuration Development OMS

OMS – Custom Solution “SCOM Effective Configuration”

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…

screenshot

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:

  • GroupDisplayName

This parameter accepts any existing group in SCOM, that contains objects. E.g. Windows Server 2012 Computer Group.

  • ManagementServer

Set your SCOM management server here.

  • CustomerID

CustomerID is the workspace id where you want to analyze your data.

  • SharedKey

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)…

image

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)….

image

As well as two different custom logs…

image

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…

image

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:

  • TargetClass_s

Class which this workflow is targeted at.

  • TargetObject_s

Object which is executing this workflow.

  • DisplayName_s

Friendly name of the rule.

  • Overridden_b

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.

image

There are 3 main views…

image

  • OVERRIDES

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.

  • RULES

Overview of all rules overridden in your environment.

  • MONITORS

Overview of all monitor overridden in your environment.

…and some other useful views, like……

image

  • 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.

  • QUERIES

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.

Deployment

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

image

…next install the PowerShell module and execute it as described above. If you want you could schedule it on a regular base.

image

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!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.