Sunday, March 21, 2010

SCOM: SecureStorageBackup.exe password failed from command line

A short (simple/funny) blog about using SecureStorageBackup.exe from the command line.

Tonight i was doing a (lab) restore for a SCOM 2007 R2 environment. After the initial install for that management group i made a backup of the encryption key with SecureStorageBackup.exe. Then, as a well raised IT-guy, i used a strong password with some great non-standard characters.

The restore process...

After restoring my OperationsManager database, i had to restore the encryption key using SecureStorageBackup.exe.

There a 2 modes for using SecureStorageBackup.exe.
  1. GUI, just start the executable from Windows Explorer. A wizard will take you through the steps required.
  2. Command Line, open command prompt and run the executable from there. Use the syntax:
    • SecureStorageBackup.exe Backup|Restore
I'm a fan of using the command line, so i did just that. But my password wasn't working. First i thought i had the wrong password. But then i remembered that using the command prompt some special characters do NOT work for passwords, like the dollar ($) sign.



So don't give up right away when you're trying to restore your encryption key and it fails. It might be something rather stupid as using special unsupported character in your encryption key password. Just use the GUI mode. click click....

Saturday, February 27, 2010

New Core MP for SCOM R2

Just came across two very interesting and detailed blogs by Marnix Wolf about the core MP update for SCOM R2.
Marnix really did a great job showing all what's new!

Part 1 - Core Monitoring Reports
http://thoughtsonopsmgr.blogspot.com/2010/02/newest-core-mp-for-scom-r2-new-road.html
Part 2 - Agent Management (nice!)
http://thoughtsonopsmgr.blogspot.com/2010/02/newest-core-mp-for-scom-r2-new-road_26.html

Configuring OperationsManagerDW grooming

Last week i did some maintenance on a Operations Manager 2007 R2 Data Warehouse. Because this piece of OpsMgr maintenance is sometimes 'forgotten', i thought it would be nice to blog about this.

After this initial deployment, there has not been much maintenance. Thanks to the integrated maintenance jobs through the Operations Manager 2007 internal management pack library and having enough disk space, no actual problems did arise.

You should, probably, know that an out-of-the-box deployment of OpsMgr 2007 keeps the collected information in your Operations Manager Datawarehouse for 400 days.

Using the sizing tools from Microsoft and from books like 'Unleashed' you can calculate how much disk space you would need keeping 400 days of historical information.
Also keep in mind the backup method you will need to use, because of the rather large database files. Always consult the Database Administrator for your implementation and maintenance plans.

When a company starts of with OpsMgr 2007 with a number of 500 agents and no known future company aquisitions no problems arise. But when that company begins to expand and more agents are becoming managed by this management group, you should really do some recalculation of the your database growth for your OperationsManagerDW as well as for your OperationsManager DB. There are some pretty handy built-in reports in Operations Manager you can use to see the daily growth. Also use the Operations Console Monitoring views to view the Database Size performance counters.

If you find that the current span of historical data is not right and has to be modified there a multiple ways for doing this.

The old way: Using a sql queries and stored procedure http://aquilaweb.com/blog/index.php?itemid=41
The new and easier way: Using a simple tool, dwdatarp.exe http://blogs.technet.com/momteam/archive/2008/05/14/data-warehouse-data-retention-policy-dwdatarp-exe.aspx

I prefer the new and easier way for obvious reasons :). I you don't want to wait for the next groom workflow, run the procedure 'p_partitioningandgrooming' on the SQL database.

Within the next two weeks i'll be performing a OperationsManagerDW relocation. Of course I'll post the details and my experiences with this actions. Note that a complete 'OpsMgr shutdown' is neccesary to do this, so your agents should be configured with enough cache memory to hold on.

Wednesday, January 27, 2010

SCOM: System Center Operations Manager R2 Unleashed - status update

The authors of SCOM 2007 Unleashed have posted an update for the release of the book System Center Operations Manager R2 Unleashed.

The 'Unleashed' books have always been a favorite of mine. Let's hope that this upcoming release is as good as its predecessors.

A copy from their Space:

System Center Operations Manager 2007 R2 Unleashed - a supplement to the earlier System Center Operations Manager 2007 Unleashed - is announced for availability mid-March 2010. As a supplement, the R2 ebook includes 9 chapters of new material covering OpsMgr 2007 R2 and additional topics not in the first book. Here's the chapter lineup:

1. Introduction and What's New
2. Unix/Linux Management: Cross Platform Extensions
3. Operations Manager 2007 R2 and Windows Server 2008
4. Using SQL Server 2008 in OpsMgr 2007 R2
5. PowerShell Extensions for Operations Manager 2007
6. Management Solutions for Small and Midsize Business
7. Operations Manager and Virtualization
8. Management Pack Authoring
9. Unleashing Operations Manager 2007

Appendix A. OpsMgr R2 by Example

Appendix B. Reference URLs

Appendix C. Available Online

Chapter 9 includes a "deep dive" into managing distributed environments, high availability, business continuity, the new Visio add-in, going beyond the basics of ACS, network monitoring using distributed applications, and targeting.

SCOM: Cumulative Update 1 for System Center Operations Manager 2007 R2

 Microsoft released Cumulative Update 1 for System Center Operations Manager 2007 R2. Many things have been fixed with this update.

Here the list as posted on the Microsoft website:
  • The Product Knowledge tab is displayed as the Company Knowledge tab after you import a language pack for System Center Operations Manager 2007 R2.
  • An agent cannot be removed successfully from a Windows Cluster service node.
  • The Heathservice.exe process on a Windows Cluster service passive node may have excessive CPU utilization.
  • The Healthservice.exe process may crash when it uses the OLE DB module.
  • The workflows that use the OLE DB data source may unload themselves if the underlying provider returns a null string or an empty string.
  • An instance of the MonitoringHost.exe process may cause a memory leak in nonpaged pool memory.
  • The notification subscriptions do not work if they are configured to parse a CustomField field or an AlertOwner field.
  • The Operations console loses the status as the current object that is in focus when a search filter is applied.
  • The SRSUpdateTool.exe process returns an error that states “Failed while updating registry entry for reporting code MSI component” when you try to upgrade SQL Reporting Services 2005 to SQL Reporting Services 2008.
  • The Operations Manager UI may crash when the Connector column and the Forwarding Status column are added to an Alert view.
  • The agents may re-process old Windows event log entries and then incorrectly generate alerts for these events that are not new.
  • Health state reliability fixes and improvements.
  • The Operations Manager Audit Collection Service (ADTServer.exe) does not start on an ACS Collector if the operating system is upgraded to Windows Server 2008 R2.
  • In a performance report that is exported, the list of object instances is not displayed.
Official Microsoft KB: http://support.microsoft.com/kb/974144

Kevin Holman (Microsoft) has done extensive research. See his blog for an upgrade plan & and what other users are experiencing: http://blogs.technet.com/kevinholman/archive/2010/01/17/opsmgr-2007-r2-cu1-rollup-hotfix-ships-and-my-experience-installing-it.aspx

SCOM: Registry discovery on 64 bit OS

When you're running 32 bit applications on 64 bit servers with a 64 bit SCOM Agent, you really should read this post. Same goes for people who wonder why their discovery does work on 32 bit servers and not on 64 bit servers.

32 bit Application on 64 bit OS

When a 32 bit application is installed on a 32 bit Windows OS, the registry keys are usually writen to :
HKEY_LOCAL_MACHINE\Software\YourVendor\ApplicationName.

This changes when the OS is a 64 bit version.
Then a 32 bit installation sets its registry keys in:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\YourVendor\AppicationName

Attribute Discovery
This is tricky when you don't know if one or both of these scenarios exists in your environment. There is more than one solution for your attribute discovery. (SCOM 2007 R2 is required for solution #2).
  1. Copy the right child keys from the key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ to HKEY_LOCAL_MACHINE\Software\
  2. Add an extra XML element to the Registry Discovery in your MP to make a '32 bit discovery' work on a 64 bit Agent.
  3. Use a VBScript for the discovery in which you have multiple ways of checking for CPU Archicture en reading registry keys
I will show you how to use solution 2. If you also would like to see how to work with solution 3.

Enable the Discovery using the 32 bit part of 64 bit registry
  • Open your Management Pack with a text editor, e.g. notepad.exe
  • Go to Discoveries section
  • Search for the Discovery in which you want to enable 32 bit discovery
  • Within the section , add the following XML element
    • <registryview>32bit</registryview>
  • Save your Management Pack
  • Done!
In XML it will probably will look like this:
<RegistryAttributeDefinition>
<AttributeName>AppExists</AttributeName>
<Path>SOFTWARE\YourVendor\ApplicationName\Value</Path>
<PathType>1</PathType>
<AttributeType>1</AttributeType>
<RegistryView>32bit</RegistryView>
</RegistryAttributeDefinition>

As other users have already noticed: If you make a change to the attribute from the Operations Console or Authoring console, the RegistryView element is deleted. So watch out for that!

See also: http://social.technet.microsoft.com/Forums/en/operationsmanagermgmtpacks/thread/bf566244-1164-4bf7-b08c-558bc7bc2363

Wednesday, January 20, 2010

SCOM: Creating and Using Dynamic Groups

Today i stubled upon a, somewhat older, but rather interesting blog post of Raphael Burri. He wrote an extensive article about creating dynamic groups in Operations Manager and what the impact is on the Root Management Server (RMS).

Raphael created some pdf's with examples of how you can create more advanced membership rules for dynamic groups.

When you use the Operations Manager Console for creating groups you may find that you're pretty limited in using more complex constuctions, like using contains/not contains expression in the membership element clauses.

Instance and Computer Groups

When you look closer to the XML code that is created when exporting a MP with a 'OC'-created Group in it, you will notice that those groups are always instanced from the InstanceGroup class.

Taking a peek at all your groups in the OC, shows Computer Groups besides the Instance Groups. What's the difference? The icon :P and the relationship type. A Computer Groups only contains computer whereas an Instance Group can contain all types of objects.
Micrsoft uses both Group type in various management packs, like the IIS and Exchange 2007 MP.

Asking around gives me the impression almost everybody is just using Instance Groups. But DO know that other group types (classes) are available.

Link to Raphael Burri's post: http://rburri.wordpress.com/2009/01/14/dynamic-group-membership-authoring-and-performance-impact-on-rms/

Friday, December 18, 2009

SCOM: Importing a Management Pack fails, Event ID 26319

In this post I'll explain a case in which an import of a Management Pack fails.
A failure can be caused my numerous things, like dependencies, but in this case the cause is in the MP itself.

Let say, you create a MP with some monitors, and groups in it. (in a Test Management Group or using the Authoring Console). This is MP version 1.0.0.0.
We call it MyAppMP. After finishing your MP, you import it in your SCOM Management Group.

Now you modify the MP file (Test MgmtGrp or Auth.Cons) and delete the groups because you don't need them anymore for some reason.
MP version is now 1.0.0.1.

You would think importing this updated MP wouldn't give any problems. Wrong! Importing this MP shows an error in the OpsMgr Console:

The requested management pack was invalid. See inner exception for details. Parameter name: managementPack

Because of this useless error message in the Console, I searched the Operations Manager Event Log on the RMS. There I found Event ID 26319. This Event ID is used more than once for logging numerous SDK to DB operations. (RMS to SQL db)

The event showed the following

Event Type:     Error
Event Source:   OpsMgr SDK Service
Event Category: None
Event ID:       26319
Date:           
Time:           
User:           N/A
Computer:       RMS Server
Description:
An exception was thrown while processing ImportManagementPack for session id uuid:46c14e53-8440-41c6-8979-77f0cce2b5b3;id=264.
Exception Message: The creator of this fault did not specify a Reason.
Full Exception: System.ServiceModel.FaultException`1[Microsoft.EnterpriseManagement.Common.ManagementPackException]: The creator of this fault did not specify a Reason. (Fault Detail is equal to : ManagementPack Version [1.0.0.1] is not upgrade compatible with older version [1.0.0.0]. Compatibility check failed with 6 errors:
-------------------------------------------------------
Error 1:
: ClassType: [UINameSpace328086d3480e4cf4a8859a3454410533.Group] is not upgrade compatible.
[ClassType]: [UINameSpace328086d3480e4cf4a8859a3454410533.Group] exists in current version [1.0.0.0] of ManagementPack but does not exist in the new version [1.0.0.1].
-------------------------------------------------------
Error 2:
: ClassType: [UINameSpace51b544ce66984f46bf9cd3733b4e07ef.Group] is not upgrade compatible.
[ClassType]: [UINameSpace51b544ce66984f46bf9cd3733b4e07ef.Group] exists in current version [1.0.0.0] of ManagementPack but does not exist in the new version [1.0.0.1].
-------------------------------------------------------
Error 3:
: ClassType: [UINameSpace6730031c44f34a1491ea6f608a3e674c.Group] is not upgrade compatible.
[ClassType]: [UINameSpace6730031c44f34a1491ea6f608a3e674c.Group] exis...).

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

This tells us that you cannot upgrade a Management Pack when have deleted groups which are in the current active version in your Management Group.

What should you do:
  • If you have an unsealed MP with overrides/customizations for MyAppMP
    • Export any customizations/overrides the unsealed MP
    • Delete the unsealed MP
  • Delete the old version of the MP, in this case MyAppMP, version 1.0.0.0.
  • Import the new version of the MP
  • Import the unsealed MP you backup in the steps before.
Other cases: