Monday, November 1, 2010

SCOM R2: Please show the architecture (x86 or x64) of the monitored Windows Server Operating Systems

Got this question from a customer: Where in the SCOM R2 Console can I see whether a monitored Windows Server OS is x64 based or not?

I checked and found nothing. However, the customer would really like to have a View in the SCOM R2 Console showing that information. And yes, some nice Reports about that would be welcome as well.

So it was time for some MP authoring. But when I started the MP Authoring Console, the next question was ‘Can’t the SCOM Console do that as well?’ Yes, it can. But there are some drawbacks like not creating real new Classes, but extending existing Classes. Also all elements do get automatically generated names which are actually nothing more but GUIDs which aren’t nice to look at. Also many things cannot be done in the SCOM R2 Console when it comes down to some real MP authoring. On the other side however, the SCOM R2 Console reduces the complexity of basic MP authoring to a great amount and could do the trick here as well. So the SCOM R2 Console was used instead.

And to be frank, I didn’t mind since I am not such a great MP Author yet. I am working on it and getting better at it every week :).

This posting will be about how to create such a MP in the SCOM R2 Console containing Views like these:
image

And these Reports:
image

Lets start at the beginning.

First we need to find a way to differentiate between x64 based Windows Server Operating Systems and x86 editions.

There are multiple approaches viable here. The one I have chosen is the presence of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node on x64 based Windows Servers. This key isn’t present on x86 based Windows Servers.

So by only checking its presence on a monitored Windows Server (if true, its a x64 based Windows Server OS, if false its a x86 based Windows Server OS) we can easily differentiate between x64 based servers and non-x64 based servers.

This information will be used for creating a new Attribute, or better an Extended Attribute.

  1. Open the SCOM R2 Console with Admin permissions, go to Authoring > Authoring > Management Pack Objects > Attributes. Right click > select Create a New Attribute;

  2. Give it a name like x64 Architecture and a good description > Next;
    image

  3. Select as Discovery Type Registry. As Target select Windows Server Operating System. (The postfix _Extended will be added automatically!)
    and create a new MP for storing this new Attribute. In this example I have created a new MP with the name Windows Server OS Architecture > Next;
    image

  4. In the next screen chose for Key Type, as Path add this entry: SOFTWARE\Wow6432Node and as Attribute Type Check if exists. For the Frequency once per 24 hours (86400 seconds) is more than enough > Finish.
    image

The Attribute is created now which can be used for the other required actions.

First of all lets check whether the Attribute is doing its work as intended. In the SCOM R2 Console go to Monitoring > Monitoring > Discovered Inventory and select as Target Type Windows Server Operating System_Extended and click OK.
image

Now you should see something like this:
image

Check out the x64 Architecture Attribute! Nice huh? This is something we can use. Lets continue with creating the Folders.

In the Monitoring Pane go to the folder Windows Server OS Architecture. Right click it > New > State View and give it a proper name like x64 based Windows Server Operating Systems and configure it like this:
image `

For items to Display go to the tab Display and select all items that you deem important and click OK:
image

Do the same for another State View with the name x86 based Windows Server Operating Systems. It should be configured like this:
image

Now you have two State Views, one showing all x64 based Windows Server Operating Systems and another showing all x86 based servers:
image

Now it is time to create some Reports. However, the Windows Server Operating System_Extended  attribute does not show itself directly in the Reports. So it is time to create two Groups which are dynamically populated (Set & Forget) and use those Groups in the Reports. One Group will contain all x64 based Servers and the other the x86 based Servers.

  1. In the SCOM R2 Console go to Authoring > Authoring > Groups. Click right and select Create a New Group > give it a proper Name like x64 Based Windows Server Operating Systems and a good description. Put it in the correct MP (Windows Server OS Architecture) > Next;
    image

  2. Skip Explicit Member and go directly to Dynamic Members. Search for the extended Class Windows Server Operating System_Extended and create a new query like this one:
    image

    It looks like this:
    image 

  3. Next > Next > Create.

  4. Repeat Steps 1 to 3 for a new Group, x86 Based Windows Server Operating Systems and here for the query it must be set to FALSE:
    image

  5. Save the Group. Check the members of both Groups in order to verify the correct working. Be aware that in huge environments it might take a while before these Groups get enumerated in the Data Warehouse…

Now it is time to create the Reports (one for the x64 Servers and the other for the x86 Servers):

  1. Go to Reporting > Microsoft Generic Report Library > Custom Configuration and open it. Add one of the earlier created Groups. For the Report Fields select the ones needed and sort them as required. For this example I have only selected these Report Fields: DNS Name, Display Name, CSD Version, Service Pack Version and (of course!) x64 Architecture;
     image

  2. Select an offset date (like today – 7 days) and Publish the Report with a good name and solid description like x86 based Windows Server Operating Systems and This Report shows all monitored Windows Server Operating Systems based on x86 architecture, like this:
    image

  3. Repeat Steps 1 and 2 for the other architecture.

And now all is complete! So with a ‘few’ mouse clicks you can see what you need. Nice huh?

No comments: