Thursday, April 19, 2012

[OpsMgr 2007] Importing a Management Pack in System Center Operations Manager fails if a dependent management pack isn't imported - KB Microsoft

Article ID: 2698846 - Last Review: April 18, 2012 - Revision: 1.0
When importing a management pack in System Center Operations Manager 2007 that has a dependency on another management pack, the import may fail with the following message:

<ManagementPackName> could not be imported.

If any management packs in the Import list are dependent on this management pack, the installation of the dependent management packs will fail.
The requested management pack was invalid. See inner exception for details.
Parameter name: managementPack

This issue occurs because a management pack that the management pack being imported depends on isn't imported in the management group. In order to work around this problem, import the dependent management packs first then import the management packs that depend on them.

NOTE If you're unsure of the dependencies for a management pack, they will be listed in the management pack guide.

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use (http://go.microsoft.com/fwlink/?LinkId=151500) for other considerations.
 ---------------------------------------------
I would add to this KB the fact that you can have an import failure if the dependencies in the management pack are created on version that is not the same of the dependent management pack that are installed in the management group. The error message will ask you the good version of the dependent managament pack.
If it's a provided MP, you 'll have to upgrade the dependent MPs - If it's your own MP, just edit the xml and give the good version of the dependent MP.

This posting is provided "AS IS" with no warranties.

[OpsMgr 2007R2] My best practice for creating overrides

After more that 16 months using SCOM, I've seen a lot of things concerning the configuration of the overrides on MPs and I think this post can be usefull to explain what to do to have a good way to apply overrides.
Microsoft has published a KB in 2007 - I've already post a word on this KB here but I would like to explain my feeling on how to do with overrides in a new post.

In order to have a proper view, you need first to define a naming convention :

  • For your Override MP
In my point of view, when you list the MP in the console (Administration pane) sorted by name, it's easier to retrieve OVR MP that have the same display name with a suffix that the MP to override.

For example :
        Provided MP IDs : Microsoft.SQLServer.2000.Monitoring.mp
        Provided MP display name : SQL Server 2000 (Monitoring)

        Create an override MP with :
        ID like Microsoft.SQLServer.2000.OVR
        Display name like SQL Server 2000 (Monitoring)

/!\ Note : When you create an Override MP in the SCOM console, you're not able to keep the digit in the ID. It could bean issue when you have to create an override MP for a dedicated version of an application.
You can also create your override MP via SCOM console, export it and remove it from SCOM. Then open the exported XML file and change the ID.

Here is the view you'll have in SCOM if you apply this naming convention : simple and easy to retrieve the Override MP.


  • For the groups you'll create to apply overrides on
I use to create 2 groups by default in each override MP - One to enable all discoveries that target Computer/Agent and the second one to disable the discoveries that target Computer/Agent.
When discoveries are enabled by default in the provided MP, I use to disable them for the class to be able to only target computer/agent I want to monitor.

For having a good view of overrides groups in the console, applying a naming convention will help you as for the override MP naming.

For discoveries, you can use :

OVR - MPName - Enable Monitoring   >> to enable discoveries
OVR - MPName - Disable Monitoring  >> to disable discoveries (enforced) - use to be able to remove a monitored server by using the remove-disablemonitoringobject cmdlet

Short example : OVR - SQL Server 2005 - Enable Monitoring

For monitor or rules :

OVR - MPName - Rule or Monitor Name - OverrideThatIsDone

Short examples :
OVR - SQL Server 2005 - Collect Buffer Cache Hit Ratio Rule - Set Tolerance to 1
OVR - SQL Server 2005 - Service Pack Compliance Monitor - Disable


With a naming convention, you will see all overrides sorted by MP and you will be able to easily retrieve overrides apply to a MP with the search engine : Just search "SQL Server 2005" for example.


Be sure you create only one override MP by MP to override :

How to be sure that overrides are stored in the good overrides MP : You can do it within SQL or by creating a SCOM report.

You need also to use the AllOverrideView view that lists the properties below for each override :
      ,[Name]
      ,[CategoryId]
      ,[TargetId]
      ,[ParentType]
      ,[ModuleId]
      ,[ModuleName]
      ,[OverrideableParameterId]
      ,[OverrideableParameterName]
      ,[ContextId]
      ,[ContextObjectId]
      ,[Value]
      ,[Enforced]
      ,[ManagementPackId]
      ,[OverrideType]
      ,[MPIsSealed]
      ,[TimeAdded]
      ,[LastModified]

And execute a SQL query on this view to retrieve for each Sealed MP, what Unsealed MP is storing overrides and the overrides count.




Never store overrides in the "Default Management pack" :

First, Microsoft offers 2 way to disable a monitor or a rule. Never use the "Disable the Monitor/Rule" menu that will store the override in the default management pack and prefer use the "Override the Monitor/rule" menu and select "for the class" or "For the group". This will help you to store the override in the OVR MP that contains the group and it will ask you what OVR MP should store the override for the class.


Always override a monitor/rule for a group :

Applying override for a specific object is really not  workable and It becomes very difficult to know which monitor is actually applied. The best is to create a group that can only be populated with the object type that is targeted by the rule/monitor to override. Once again, using SCOM console to create group does not allow you to choice the object type, or perhaps only when you populate the group at it's creation.. Have to check this. In my side, I prefer to create groups within the authoring console.

I would add that the groups used to override a specific rule or monitor should be populated by the same object type of the class where is implemented the rule/monitor.

Example : you have to create an override on the "Percentage of Committed Memory in Use" in the OS MP. This monitor is created in the class Windows Server xxxx Operating System . You can of courses create a group that contains Agent or Computer object and let the SCOM product detect the OS for the agent or server. It's in my mind more understandable to populate the group to override this monitor with Operating system object.



Cleaning up the default management pack:

The default MP is used to store specific information for the management group. The best practice is to NOT write any custom overrides or create monitors, rules or group to this MP.
Easy to write but the reality is other... sometimes, you can modifiy this MP by accident. The main issue is that dependency is created for this MP on any MP it refenrences when you store overrides or groups and we are not able to delete those MPs until the default MP is not clean up.
Here is also 2 links that explain how to remove dependencies on the default MP.


In short terms, to clean up the default MP, you must :
  1. Export the default MP - create a backup
  2. Identify the rules, monitor, group that have been created in it
    • For each rule, monitor or group, recreate them in an other MP
    • Delete them from the default MP
    • Delete associated Displaung
  3. Identify the overrides that are stored in it
    • For overrides recreate them in an other MP
    • Delete them from the default MP
  4. Identify the views that have been created in it
    • Each view must be recreated in an other MP
    • Delete them from the default MP
  5. When step 1, 2 and 3 is done, delete all un-used references.
  6. Re-import the Default MP

Hope I'll add some other things here..... don't hesitate to comment !
 
 
New information added on 4/24/2012
 






 
Application models
 
 





 

This posting is provided "AS IS" with no warranties.

[SQL & SCOM] What Unsealed MP is storing overrides - SQL query

Here is a usefull query that will help you to retrieve where are stored your overrides by unsealed MP.

It can help you to retrieve where are stored the overrides on a specific MP or what overrides are stored in the specific MP (for example the default MP ;) ) to be able to clean up this management pack.


Here is the query to execute on the OperationsManager :

SELECT MP.MPName, MP.MPVersion, OVRMP.MPName AS 'Unsealed MP', OVRMP.MPVersion AS 'Unsealed MP Version', COUNT(AOV.Id) AS 'Number of Overrides'
FROM AllOverrideView AS AOV LEFT OUTER JOIN
                     
Rules AS R WITH (nolock) ON AOV.TargetId = R.RuleId LEFT OUTER JOIN
Monitor AS M WITH (nolock) ON AOV.TargetId = M.MonitorId LEFT OUTER JOIN
DManagementPack AS MP WITH (nolock) ON
    (CASE
    WHEN AOV.OverrideType = 'RuleProperty' THEN R.ManagementPackId
    WHEN AOV.OverrideType = 'RuleConfiguration' THEN R.ManagementPackId
    WHEN AOV.OverrideType = 'MonitorProperty' THEN M.ManagementPackId
    WHEN AOV.OverrideType = 'MonitorConfiguration' THEN M.ManagementPackId
    WHEN AOV.OverrideType = 'DiscoveryProperty' THEN D .ManagementPackId
    WHEN AOV.OverrideType = 'DiscoveryConfiguration' THEN D .ManagementPackId
    END) = MP.ManagementPackId INNER JOIN
ManagementPack AS OVRMP WITH (nolock) ON OVRMP.ManagementPackId = AOV.ManagementPackId
WHERE     (MP.MPName IS NOT NULL)
GROUP BY MP.MPName, OVRMP.MPName, MP.MPVersion, OVRMP.MPVersion
ORDER BY MP.MPName, 'Unsealed MP'

Result exported to excel should be like :




This posting is provided "AS IS" with no warranties.

Wednesday, April 18, 2012

[OpsMgr 2007] How to create a group of objects that are contained by an other group

First I would like to thanks  for his post http://blogs.technet.com/b/kevinholman/archive/2010/09/09/how-to-create-a-group-of-objects-that-are-contained-by-some-other-group.aspx

I've work on the MP he has provided is his post and added 3 groups to answer this interesting customer request.

The request was to be able to make an override on the monitor "Percentage of Committed Memory in Use" in the OS MP for all SQL servers. Not so easy to do it since you retrieve at least 3 monitors "Percentage of Committed Memory in Use" - one in each Windows Server xxxx Operating System class. We have also to build 3 groups, one per OS version.

And to be really clean, I have to create 3 dynamic groups that contains Operating System.objects - one by OS version. Dynamic groups because customer asked the override to be created for all SQL servers monitored.
  1. One group of Operating System = 2008 and server is SQL server
  2. One group of Operating System = 2003 and server is SQL server
  3. One group of Operating System = 2000 and server is SQL server
As explained by Kevin, this is not doable within the SCOM console, you have to edit group in the authoring console.

The way to proceed will be the same as the one explained by Kevin. I've also add some other references to the Microsoft Windows Server xxxx MPs :



Then you are able to create 3 classes OS2000GroupSQL, OS2003GroupSQL and OS2008GroupSQL and the 3 associated discoveries:
  1. Populate OS Group – SQL – 2008 Server
  2. Populate OS Group – SQL – 2003 Server
  3. Populate OS Group – SQL – 2000 Server
For each discovery, choose a target class, which will be the Group class we just created earlier. Select the “Discovered Classes” tab and add Microsoft.SystemCenter.InstanceGroupContainsEntities in the “Discovered relationships and their attributes”.
Then select the Configuration tab, Browse for a Type and select Microsoft.SystemCenter.GroupPopulator. Give a module ID - then you may have an error that must be ignored.
On the configuration screen – select “Edit”
We will be replacing the XML showing in Notepad with an example I have written.  Highlight all but the first line and delete it.

Then paste this for the 2008 discovery :

<RuleId>$MPElement$</RuleId>
  <GroupInstanceId>$MPElement[Name="Custom.Group.Example.OS2008GroupSQL"]$</GroupInstanceId>
  <MembershipRules>
    <MembershipRule>
      <MonitoringClass>$MPElement[Name="Server2008!Microsoft.Windows.Server.2008.OperatingSystem"]$</MonitoringClass>
      <RelationshipClass>$MPElement[Name="MicrosoftSystemCenterInstanceGroupLibrary!Microsoft.SystemCenter.InstanceGroupContainsEntities"]$</RelationshipClass>
      <Expression>
        <And>
          <Expression>
            <RegExExpression>
              <ValueExpression>
                <Property>$MPElement[Name="Windows!Microsoft.Windows.OperatingSystem"]/OSVersionDisplayName$</Property>
              </ValueExpression>
              <Operator>ContainsSubstring</Operator>
              <Pattern>2008</Pattern>
            </RegExExpression>
          </Expression>
          <Expression>
            <Contained>
              <MonitoringClass>$MPElement[Name="Windows!Microsoft.Windows.Computer"]$</MonitoringClass>
              <Expression>
                <Contained>
                  <MonitoringClass>$MPElement[Name="MicrosoftSQLServerLibrary!Microsoft.SQLServer.ComputerGroup"]$</MonitoringClass>
                </Contained>
              </Expression>
            </Contained>
          </Expression>
        </And>
      </Expression>
    </MembershipRule>
  </MembershipRules>
</Configuration>


Save the discovery, save your MP and import it in your DEV environment ! :)

You will be able to retrieve your new group in the authoring part :
Note I've keep the group created by Kevin.



Just right click on it and select “View Group Members” - the group OS Group - SQL - 2008 Server should be populated with OS 2008 objects corresponding to SQL server installed in Windows server 2008 or 2008 R2 and all other version.





You can download my MP for testing purpose here in this folder

This posting is provided "AS IS" with no warranties.

Thursday, April 12, 2012

[OpsMgr 2007R2][OpsMgr 2012] How to keep SQL 2000 monitoring after upgrading the MP in version 6.3.173.0

As you should know, the SQL Server Management Pack has been released in version 6.3.173.0 and this new MP provides the capabilities for Operations Manager 2007 R2 and Operations Manager 2012 to discover SQL Server 2005, 2008, 2008 R2, and SQL Server 2012. It monitors SQL Server components such as database engine instances, databases, and SQL Server agents.

That means the librairy does not contain any more the classes dedicated to SQL 2000 monitoring... What a pitty when you always have SLQ 2000 instances and when the SQL team tell you they are ready for SQL 2012 installations !

Microsoft has also published in May 2011 a dedicated MP + it's library to monitor SQL 2000 instances ! See http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15226 
BUT what a surprise to see that both Library ( in the SQL 2000 MP and in the release 6.3.173.0) have the same name : Microsoft.SQLServer.Library.mp

Impossible to import both library... and also impossible to keep SQL 2000 monitoring after an upgrade to  6.3.173.0 MP version.

I've also decided to unseal the MPs and rename the Library to be able to import SQL 2000 MP in parallele of the release 6.3.173.0 MP.

Or you can download a .ZIP file here : >>>>>> Click to Download <<<<<<


Please reseal all 3 MPs before importing in SCOM.

NOTE this will be supported by Microsoft but it's the only way I've found to be able to always monitor the SQL 2000 instances and be ready for SQL 2012 monitoring.


Here is the result after import in SCOM :


Hope this will help you ! :)

This posting is provided "AS IS" with no warranties.

[OpsMgr 2007][OpsMgr 2012] Monitoring Pack for System Center 2012 - App Controller

Version:          1.0.1200.0
Release Date:  4/6/2012

The Microsoft System Center 2012 - App Controller monitoring pack is designed to be used for monitoring System Center 2012 - App Controller's health.

Files in this download

The links in this section correspond to files available for this download. Download the files appropriate for you.

File name
Size
AppControllerMP_Chinese.msi427 KBDownload
AppControllerMP_English.msi361 KBDownload
AppControllerMP_French.msi428 KBDownload
AppControllerMP_German.msi425 KBDownload
AppControllerMP_Italian.msi427 KBDownload
AppControllerMP_Japanese.msi434 KBDownload
AppControllerMP_Portuguese(Brazil).msi428 KBDownload
AppControllerMP_Russian.msi432 KBDownload
AppControllerMP_Spanish.msi425 KBDownload
System Center 2012 - App Controller Management Pack Guide.doc255 KBDownload



Overview
The Microsoft System Center 2012 - App Controller monitoring pack is designed to be used for monitoring System Center 2012 - App Controller's health. It allows you to proactively manage App Controller and identify issues with the App Controller services, website and database.
The System Center 2012 - App Controller monitoring pack includes rules to monitor and report on the availability of the App Controller services, website and database.


Release History

•4/6/2012 - Original English Release, version 1.0.1200.0
System requirements
Supported operating systems: Windows Server 2008 R2

•Other Software: System Center Operations Manager 2007 R2 or later

Instructions
To use the English version of the System Center 2012 - App Controller Monitoring Pack, you only need to download and install the English (EN) version of the Monitoring Pack.
If you want to use a localized version of the monitoring pack, you must first download and install the English version of the monitoring pack. Then, you must download and install the language pack for your respective language. The English version of the monitoring pack includes the prerequisites for all localized versions of the monitoring pack. For detailed information about installing and using this monitoring pack, download and read the Monitoring Pack for System Center 2012 - App Controller's Guide. That guide is available for download on this Web page.


This posting is provided "AS IS" with no warranties.

Wednesday, April 11, 2012

[OpsMgr 2012] How to add a product key to an eval version of System Center 2012 Operations Manager

Article ID: 2699998 - Last Review: April 10, 2012 - Revision: 1.1
After installing System Center 2012 Operations Manager, you may look at Help -> About and see (Eval) after the Version info.This article describes how to add a Product Key to the Eval edition of System Center Operations Manager 2012. 
To set the product key, use the Set-SCOMLicense cmdlet in PowerShell. To use the Set-SCOMLicense cmdlet you need to use elevated permissions. (Run as Administrator).
1.       Open PowerShell as and Administrator
2.       Load the OperationsManager Module (import-module operationsmanager)
3.       Connect to your ManagementGroup (New-SCOMManagementGroupConnection)
4.       Use Set-SCOMLicense “yourlicensekey
5.       To check if changes were executed run Get-SCOMManagementGroup | ft skuforlicense, version, timeofexpiration –a

Note: This may require a reboot after running in order to register correctly.

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use (http://go.microsoft.com/fwlink/?LinkId=151500) for other considerations.


This posting is provided "AS IS" with no warranties.