Backstage ticket to OMS: Setting up the debug environment

26 Jun

Hi since OMS (Microsoft Operations Management Suite) is a new product on the market it is always a challenge to see how the internals are working. So I was planning to take you on an OMS backstage trip.
I will post a couple of blog post explaining how OMS works and how I figured it out.

This first post will be all about how to setup your debug environment, with this you can see what data is transferred and is a good starting point of see what’s going on. Since OMS uses HTTPS we have to do some more than a normal http trace.

Here we go. I assume you are not a real rookie DEVOPS so I won’t explain every step in detail. ūüėČ

  1. Setup your OMS connection on your SCOM management group and enable the log collection.
  2. Watch if you see any events in the OMS event dashboard. If this is true then you can continue. If not first fix this.
  3. Install fiddler on your management server (for debugging I always use only 1 MS , so I know where it runs)
    1. Configure fidller proxy to 8888

       

    2. Enable https decription

       

       

    3. Copy the DO_NOT_TRUST_FiddlerRoot cert from user ssl to computer ssl store:

       

     

    1. Copy the DO_NOT_TRUST_FiddlerRoot root cert to the computer trusted ca

     

     

    1. Set OMS insight to proxy hjttp://localhost:8888

     

     

    1. Watch the sessions. Now if you see a session like below “PostDataItems” you click on it (1).

      Now you press on the inspectors (2) and headers (3). A message asking you to decode (yellow part) will popup (4) . And you do this.

       

     

    After the decode step you get the message request body , open the XML tab (1) and you see the request body send (2)

     

     

    And now you can continue to see what is transferred and received. In this case the data that is transferred to OMS is in the DataItem element.

     

    So far part 1. In the next part I will show you how to read data back from OMS

     

    Happy SCOMMING

    Michel Kamp

     

    http://MichelKamp.wordpress.com

Advertisements

Goodbye iPhone, hello my old friend

23 Dec

So yes I did it, seen it and done it! It all began with getting a new company car. This ‘state of the art’ electric car had a multimedia system that wouldn’t let me import the telephone contacts from my Lumina Windows phone. However the manufacture states it has to use a specific Bluetooth protocol and my Windows phone has it, it still wouldn’t work. So I was wondering if an iPhone was working. I borrowed an iPhone 5s from a collage. To keep this Bluetooth chapter part short “also the iPhone didn’t work”. So conclusion is the multimedia system isn’t as good as they say. But never less I was curious why everybody wanted an iPhone. So I decided to drop my windows phone and try the iPhone for a while. My kids have an iPad mini my wife an iPad 3 and I have (somewhere) an old iPad 1. So I am not a noob on how the apple interface should work. Yes I must admit it has (for now) more apps in the store but the one’s I use daily where also on my windows phone. Yes the design is okay too. But NO to:

  • the battery live time , had several occasions it should had wake me up with the alarm but it didn’t because the battery was dead. Yes I charge it daily. My windows phone could easily stay up for an extra night without a charger. This due to the battery safe mode!
  • the user interface, I really can’t get used to the interface. Yes I am a Windows guy so maybe that’s the problem, I also had problems with the MAC OS when I tried that for a while. I really LOVE the windows phone Metro interface. It’s fresh and giving me a one eye shot of the most important information I want to see. Especially the notification center (thank you Microsoft) is a winner. (tip for Microsoft: next time release it with the first windows phone version you release)
  • drop proof, I have accidentally dropped my windows phone several times on the floor. I could pick it put and continue without any damage. Looking at the iPhone i would never never try this out..
  • working better together, Yes I am a Microsoft guy, I work daily with Microsoft products. A Windows Phone just integrates better with my Windows computer on working / sharing documents and data. Yes I know for example OneDrive is available for the iPhone, I tried it but it was not working as expected. And yes I know probably not due to the iPhone but probably due to the app, but I (and you) must admit: would Apple release an Apple app for the Windows Phone? So good job Microsoft to also provide native apps on other platforms.

After 2 months using the iPhone my hands began to sweat and I was going to be more and more wising my old Windows phone back. Yesterday after 3 month of trying the iPhone at daily base I made my mind up and concluded the iPhone wasn’t made for me. I gave it a fair change but YES YES finally I have my Windows Phone back!!

 

Happy SCOMING Windows Phone’ing,

Michel Kamp

xSNMP for SCOM 2012

31 Oct

Hi,

In the SCOM 2007 age we had a fantastic network management pack called xSNMP. Not only because it was free but also because it covered a lot of network devices that even now aren’t covered in SCOM 2012. But what happened ‚Ķ.

The Problem

SCOM 2012 was introduced and contained a brand new way to monitor network devices. This indirectly replaced the complete SNMP stack out of SCOM. Well not the complete SNMP stack but the discovery process was changed and not compatible with the old SNMP stack. I am not going into details if this is a good or bad thing but for the xSNMP mps it was RIP‚Ķ. (as far as you didn’t do a SCOM 2012 upgrade)

Solution

.. or not …. I decided to take a couple of xSNMP MPs and redesign it to work in SCOM 2012.

For now I have changed the APC mp. Also the same for the Brocade MP and this one is now in the testing phase.
Since the complete xSNMP mps are community free I will share the compiled mps also for free. The source code I share later on.

Reminder: All the credits go to the original xSNMP devOps. I only redesigned it to work with SCOM 2012. So if it breaks down your environment don’t knock on my door ;-)))

You can download the MPs here:

Happy SCOMMING !!

Michel Kamp

https://michelkamp.wordpress.com

 

 

 

 

[FIX] Part 2. Fixing the Top n by Performance Widget now the supported way

5 Sep

 

Hi,

In May this year I posted an article on how to fix the top-n widgets. https://michelkamp.wordpress.com/2014/05/27/fix-fixing-the-top-n-by-performance-widget/

This unsupported fix worked great for SCOM 2012 CU1/6 and SCOM 2012 R2 UR1/2.

I don’t know if the SCOM product team has read my blog but it seems they have listened and responded to the community! ūüėČ Because now, after almost a year, by applying SCOM 2012 Sp1
CU7 or SCOM 2012 R2 Update Rollup 3 it is officially FIXED !!!

Thank you Microsoft SCOM product team for this fix !!

 

Analyze:

 

To verify you open the stored procedure “[sdk].[Microsoft_SystemCenter_Visualization_Library_TopNEntitiesByPerfGet]” from the DWH database.

The part where we had to replace the = by like is now completely rewritten. By using an extra stored procedure “[sdk].[Microsoft_SystemCenter_Visualization_Library_PerformanceCounterListByMultipleManagedEntities]

Let’s look it up:


— Use existing sprocs to narrow down the perf counter instances that are valid for the contained types. Avoids duplicating that logic here.


INSERT
INTO
#ResolvedPerfInstancesTable
(ContainerManagedEntityRowId, ObjectName, CounterName, InstanceName, PerformanceRuleInstanceRowId, ManagedEntityRowId)


EXEC
[sdk].[Microsoft_SystemCenter_Visualization_Library_PerformanceCounterListByMultipleManagedEntities]


@ManagementGroup
=
@ManagementGroup,


@ObjectNamePattern= @ObjectNamePattern,


@CounterNamePattern
=
@CounterNamePattern,


@InstanceNamePattern
=
@InstanceNamePattern

 

Looking into this extra stored procedure gives me the wanted ‘Like’ statement we were waiting for:


— Populate this table with the target types of the matching rules.


INSERT
INTO
#RuleTargetTypesAndTheirBaseTypes


SELECT
RMV.TargetManagedEntityTypeRowId, PR.ObjectName, PR.CounterName, PR.RuleRowId, METMPV.AbstractInd


FROM
vPerformanceRule
PR


JOIN
RuleManagementPackVersion
RMV
ON
RMV.RuleRowId = PR.RuleRowId


AND
EXISTS
(SELECT
ManagementPackVersionRowId
FROM
dbo.ManagementGroupManagementPackVersion
M2


WHERE
M2.ManagementPackVersionRowId = RMV.ManagementPackVersionRowId


AND
M2.LatestVersionInd=1)


JOIN
ManagedEntityTypeManagementPackVersion
METMPV
ON
METMPV.ManagedEntityTypeRowId = RMV.TargetManagedEntityTypeRowId


JOIN
dbo.ManagementGroupManagementPackVersion
MGMPV
ON
MGMPV.ManagementPackVersionRowId = METMPV.ManagementPackVersionRowId


AND
MGMPV.LatestVersionInd=1


AND
MGMPV.ManagementGroupRowId=@MGRowId


WHERE ((PR.ObjectName
LIKE
@ObjectNamePattern)


AND
(PR.CounterName
LIKE
@CounterNamePattern))

 

Solution:

 

You can download the SCOM 2012 SP1 CU7 here http://support.microsoft.com/kb/2965089

And the SCOM 2012 R2 Update Rollup 3 here http://support.microsoft.com/kb/2965445

As always I have the habit to walk on the edge of supported/unsupported scenarios so in case of you are in a situation you can’t apply the complete update package you could (haven’t tested it yet) import only the updated MPs located in the directory:

C:\Program Files\System Center 2012\Operations Manager\Server\Management Packs for Update Rollups

Especially MPs Microsoft.SystemCenter.Visualization.Component.Library.mpb and Microsoft.SystemCenter.Visualization.Library.mpb because they contain the widget fix.

 

So community keep on SCOMMING and making great dashboards!!

Michel Kamp

https://michelkamp.wordpress.com

[FIX] Fixing the Top n by Performance Widget

27 May

Update!: Fixed the run issue on SCOM 2012 R2 installations in MP version V1.0.0.6 . Thanks community for pointing out to this R2 issue.

Challenge:

First, I really LOVE the dashboard widgets included in SCOM. When making MPs I always deliver dashboards that gives the operator a one shot overview of the monitored targets. The most used and valuable widget for this is the “Objects by performance Widget”

This works perfect EXECPT when you have more instances of a performance value. Let’s say the table space free of table spaces, or disk C: D: ect from windows servers.

The problem is that most of the time you will get the situation below “Empty Widgets”

 

The problem is the Stored Procedure “Microsoft_SystemCenter_Visualization_Library_TopNEntitiesByPerfGet“. I don’t go into details because this issue is a known fact and already reported several times on the community. For example by Cameron Fuller http://blogs.catapultsystems.com/cfuller/archive/2013/06/05/issue-with-the-objects-by-performance-widget-with-and-all-performance-instances-scom-sysctr.aspx

But a fix for this in a SCOM CU was till now never released…. Till now….

 

Analyze

As I mentioned before it’s in the Stored Procedure “Microsoft_SystemCenter_Visualization_Library_TopNEntitiesByPerfGet“. We have a code part that does an exact match on the instance name. If we want to show all instances it will not return any matches. See the yellow parts below.

  • ¬†¬† INSERT
    INTO
    #ResolvedSeriesTable(ManagedEntityRowId, PerformanceRuleInstanceRowId)

                  SELECT
    CET.ContainedEntityRowId, PRI.PerformanceRuleInstanceRowId

                  FROM
    PerformanceRule
    PR

                  JOIN
    PerformanceRuleInstance
    PRI
    ON (PR.RuleRowId = PRI.RuleRowId)

                  JOIN
    #ContainedEntitiesTable
    CET
    ON (1=1)

            WHERE (
    (PR.ObjectName
    =
    @ObjectNamePattern)
    AND

                    (PR.CounterName
    =
    @CounterNamePattern)
    AND

                    (PRI.InstanceName
    =
    @InstanceNamePattern))

Suggestion to fix, is to use a like match. See yellow part.

       INSERT
INTO
#ResolvedSeriesTable(ManagedEntityRowId, PerformanceRuleInstanceRowId)

              SELECT
CET.ContainedEntityRowId, PRI.PerformanceRuleInstanceRowId

              FROM
PerformanceRule
PR

              JOIN
PerformanceRuleInstance
PRI
ON (PR.RuleRowId = PRI.RuleRowId)

              JOIN
#ContainedEntitiesTable
CET
ON (1=1)

        WHERE (
(PR.ObjectName
like
@ObjectNamePattern)
AND

                (PR.CounterName
like
@CounterNamePattern)
AND

                (PRI.InstanceName
like
@InstanceNamePattern))

 

To change this you will need SQL Developer knowledge. And I realize that most of the operators know a lot of backend/frontend products but aren’t developers. So it could be a bit of a challenge to change this stored procedure yourself.

 

Solution

To solve this issue I have created a Management Pack that changes this stored procedure for you. It doesn’t do this automatically, because I want you to choose to do it. So I implemented it as a SCOM task. When you import the MP and go the ManagementServer target that has the property “Is Root Health Service Emulator = True” (you can find it in the view Operations Manager -> Management Server -> Management Servers State) you will see a Task “Task Fix TopNQuery Widget“. Now you execute the task and you will see a Task output below:


And you go to the Widget dashboard you created and what do you see ????

 


Yes a working TopN Widget page.

 

NOTICE!!!

Using this task is totally unsupported. But in my opinion the negative impact is very low compared to the positive impact because this stored procedure is only used for reading data and not changing it so it wouldn’t impact the DB with incorrect data (except for some SQL performance penalty for the use of the like statement).

NOTICE!!!

When you reload the MP Microsoft.SystemCenter.Visualization.Library the stored procedure will be overwritten to the original version. This could happen¬†if you implement an upcoming CU release. If the issue isn’t fixed in this release you must rerun the TASK again.

 

You can download this MP on my personal download site:

https://onedrive.live.com/redir?resid=A6ECD6E173E79D82!6314&authkey=!AE0rJkhRPXOcblI&ithint=file%2c.zip

Happy Scomming

Michel Kamp

[BUG] VSAE with a PowerShell $Data parameter

27 May

Hi,

This time for a short post on a ‘possible’ bug i detected in VSAE

Problem:

You create a PowerShell script and want to include this script using the $includeFileContent/<script_name>$ tag.

For example

<ProbeAction
ID=Probe
TypeID=Windows!Microsoft.Windows.PowerShellProbe
RunAs=SystemCenter!Microsoft.SystemCenter.DatabaseWriteActionAccount>

<ScriptName>FixTopNQuery.ps1</ScriptName>

<ScriptBody>$IncludeFileContent/FixTopNQuery.ps1$</ScriptBody>

<TimeoutSeconds>300</TimeoutSeconds>

<StrictErrorHandling>true</StrictErrorHandling>

</ProbeAction>

(Added a screenshot below)

The FixTopNQuery.ps1 is a PS script added to the project as “Embedded Resource”.

Now you compile the project and you get a compile error:

Error    1176    The configuration specified for Module Probe is not valid.

: Incorrect expression specified: $DataSet=New-Object System.Data.DataSet

. Unable to resolve this expression. Check the expression for errors. (Hints: Check for correct character casing (upper case/lower case), mismatched “$” signs, double quotes(“), square brackets “[” or “]”). Here is a sample expression: $Data/EventNumber$

(Path = OpsLogix.IMP.Oracle.Dashboards.Task.FixTopNQuery/Probe)    C:\Program Files (x86)\MSBuild\Microsoft\VSAC\Microsoft.SystemCenter.OperationsManager.targets    255    6    Dashboards

(Added a screenshot below)


Hmmm.. Why ?

 

Analyze

After a lot of error and retry I found out that the problem is in the included powershell script. And exactly in this line below:

$DataSet=New-Object System.Data.DataSet

Hmm I hear you thinking, what’s wrong with this statement? That exactly what I was thinking‚Ķ. But when I change the parameter name the compile was successful‚Ķ

 

Solution

Do not start a parameter name with $Data in the powershell script. It looks like it’s a reserved word in VSAE.

 

I will share this issue also with the VSAA product team.

Happy Scomming

Michel Kamp

Joining the Opslogix Dev Team

26 Feb

Hi,

Just a quick note. Since begin February 2014 i changed job. I wanted to do more deep dives into creating System Center add-ons like SCOM Management Packs. So I joined the OpsLogix Dev team. I will be working on the Opslogix released Management packs , for example VMWARE , Oracle and Blackberry.

Right now I have finished an IBM WebSphere MQ MP and I’m now designing the ORACLE RAC monitoring MP. Many other new products will follow in our roadmap. If you need any custom MP or have a need for authoring assistance please let me know.

Let’s do some “Happy Scomming”!

Michel Kamp

http://www.opslogix.com

 

Oracle Monitoring:
http://www.opslogix.com/products/oracle-management-pack

vmware Monitoring:
http://www.opslogix.com/products/vmware-intelligent-management-pack

Blackberry Monitoring:
http://www.opslogix.com/products/blackberry-management-pack