Send SCOM Custom Performance Counters to OMS
Since the release of the Operations Management Suite there have been a lot of solutions and intelligence packs been added. One of the latest ones was a pack to upload Performance Counters to OMS by defining them in the OMS console.
This performance collection is being setup by OMS intelligence packs that are distributed to the SCOM Management Server and Agent.
Intelligence Pack ID |
Intelligence Pack Display Name |
Management Pack Bundle |
Microsoft.IntelligencePacks.Performance |
Microsoft System Center Advisor Performance collection library |
Microsoft.IntelligencePacks.Performance.mpb |
Microsoft.IntelligencePacks.Types |
Microsoft System Center Advisor Types Library |
Microsoft.IntelligencePacks.Types.mpb |
This has brought up the question, if it is possible to also upload custom performance counters from SCOM into OMS. My colleague Wei Hao Lim has shown, that it is indeed possible by using two Write Actions from these Intelligence Packs. For details, look at https://blogs.msdn.com/b/wei_out_there_with_system_center/archive/2015/09/29/oms-collecting-nrt-performance-data-from-an-opsmgr-powershell-script-collection-rule-created-from-a-wizard.aspx.
For the upload to work, the Performance Object Name has to be built like this: \\FQDN\ObjectName. This means, that if you want to just add the new write actions to a standard rule, you end up with Performance Objects in SCOM that have different ObjectNames for each agent.
While this might just be a cosmetic problem, I don't really like this, having fought many battles with the SQL Performance Counters that include the SQL engine name in many cases. So my goal was to create write actions into OMS based on the ones that Wei has used, but be able to send a normal looking ObjectName into SCOM database and DWH and a OMS compliant ObjectName into OMS. To achieve this, I created two new WriteActionTypes like this:
Basically what's happening here is that I create the Performance Counters with a "normal" SCOM ObjectName and when it is time to send them to OMS, I run them through a second DataGenericMapper to change the ObjectName into the OMS compliant ObjectName format of \\FQDN\ObjectName. After that, they are fed into the same write actions, that Wei has described in his Blog Post.
As you can see, the first DataGenericMapper gets the PropertyBag output of your custom Performance Counter Script in the well-known $Data/Property[@Name='<PropertyName>']$ format. The second one gets the same Data that is then already on the Data bus, therefore can be referred to by $Data/<PropertyName>$ . If you target a class coming off of Microsoft.Windows.Computer, the FQDN translates to
\\$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$
making the whole term look like
\\$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\$Data/ObjectName$ .
These two new WriteActionTypes can then be used in your Performance Collection Rule like this:
By doing this, you get a "SCOM-like" Performance ObjectName in SCOM while still being able to comply with the OMS ObjectName format and upload your customer performance data into OMS.
Here is the counter in SCOM:
And here the same counter in OMS:
So if you are not shy to edit Management Packs in XML, import the Management Pack and start using the new Write Actions.
The reference should look similar to this:
Now add the new Write Actions to your Rule. In the XML it should then look like this:
Now be patient, it might take a few hours for the counters to show up in OMS, but eventually they will.
Hope you are having fun with this and start using OMS more often…
You can download the Management Pack from https://gallery.technet.microsoft.com/Sample-MP-WriteActions-to-b720052e
Some general Information about Near Real Time (NRT) Performance Data in OMS:
https://blogs.technet.com/b/momteam/archive/2015/09/01/near-real-time-performance-data-collection-in-oms.aspx
UPDATE:
I added the Version 1.2.1102.0 of the OpsInsights Management Pack Microsoft.IntelligencePacks.Performance to the ZIP File. Some people have told me that this is being a blocker for installation.
Disclaimer:
All information on this blog is provided on an as-is basis with no warranties and for informational purposes only. Use 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 my employer.
Comments
- Anonymous
October 29, 2015
Hi,
Are you using the most recent version of the advisor MP's? I don't have Microsoft.intelligencepacks.performance in my environment but it's still working anyway.
Can't import your MP because of the dependency.
Thanks for checking.
KR
Dieter - Anonymous
October 30, 2015
I am using the Version 1.2.1102.0 of the Microsoft.IntelligencePacks.Performance.
Not sure which Version is currently deployed by OMS: But I will add the Pack into the Package.