Udostępnij za pośrednictwem


OpsMgr: Saved some overrides to Default Management Pack, didn’t you? – It’s simple to move them!

This article explains how to move overrides from the Default Management Pack to any other unsealed management pack in System Center Operations Manager 2007 R2 or 2012.

 

This is a very common problem I see when visiting customers. Most of people, right after installing OpsMgr, start to create overrides, and store then to Default Management Pack. This could be a problem, because:

 

  •     If you created an override for a monitor from Exchange MP, for example, references would then be created in Default MP, and that would prevent you from deleting the Exchange one;
  •     You created these overrides in a test environment, and wants to send to production, but can’t override the production default MP
  •     Your environment is growing, and you no longer wants to have all your overrides in the same management pack, instead, you want to organize them in categorized MPs.

 

So, for moving overrides from the Default MP, these are the main steps:

 

  1.    Create a new Management Pack to receive the overrides;
  2.    Export both management packs, for some XML editing (don’t worry, it’s simple);
  3.    Copy the references and overrides XML sections to the new MP;
  4.    Reimport MPs.

 

1. Create a new Management Pack to receive the overrides;

In Administration Pane, right-click “Management Packs” and select “Create Management Pack”

 

 

Type a Name and Description (if desired) and click Next, and then Finish.

 

2. Export both management packs, for some XML editing (don’t worry, it’s simple);

 

In the Administration Pane, click in the left on Management Pack, and you will get a list of all installed MPs. Right-click the ones you want to export, and select the folder.

 

 

3. Copy the references and overrides XML sections to the new MP;

 

Before we proceed, let me just show you the override I will be moving, it’s for a monitor called AD Database Free Space Monitor, and it’s possible to see in the picture it’s stored in the Default Management Pack.

 

 

Now, I will look for the exported MPs in Windows Explorer. The default MP will be stored as Microsoft.SystemCenter.OperationsManager.DefaultUser. I will just right-click it, and select “Edit”. It should open notepad or another XML editor, if you have one installed.

These are the two sections in default MP we are interested in. The first one is about the references. You could have many here, so I highlighted only the ones I will use. You could do some analysis to understand each ones are really needed, but I will just pick up the ones related to AD. Copy them, and remove if you want. In case you remove, but there is still an override using it, SCOM won’t let you import back the MP. Copy everything inside the red square.

 

In the Test.ManagementPack, I already have the References section, so I will just paste the references, between the end of existing reference (After </Reference>) and the end of References section (Before </References>).

 

 

 

This second section is about overrides. I have three of them, but will only copy the one I wanted, the last in the list. Again, copy everything inside the red square, but remove these lines from Default MP, since this can create a conflict of the same override in two Management Packs.

 

 

 

Now, for the overrides, Test.ManagementPack doesn’t have the section created, so we will manually add the lines, right after </Manifest>.

 

 

Then we can paste the override:

 

 

 

Now, save the changes made to both MPs, and let’s go to the final step.

 

4. Reimport MPs.

 

First I will import back the edited Default Management Pack. In administration panel, right-click “Management Packs” and select “Import Management Packs…”

 

 

Click Add…, then Add from disk… and No, for the Online Catalog Connection message box.

 

 

I will first import only the Default MP, select Install, and then Close:

 

 

 

 

 

I will check my overrides view now:

 

Ok. The override is gone, because I only imported the Default MP. I will now import the Test.ManagementPack and check again my Overrides view:

 

Great! Now the Override is in the correct MP.

 

This post is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of Use