Yesterday I was out on a client site as they are migrating their Operations Manager 2007 environment to OpsMgr 2012 R2 and the question was raised about migrating their notifications. As you probably are aware, ‘notifications’ comprise of a few components – subscriptions, subscribers and channels. Now this client has quite a few notifications built up and they weren’t keen on having to rebuild all of this in the new environment.
Well it’s actually a pretty simple process to migrate the existing ones.
Log onto the old 2007 environment and open up the SCOM Console. Head over to Administration, then Management Packs and look for the Microsoft.SystemCenter.Notifications.Internal Management Pack (It has the display name of Notifications Internal Library). It’s unsealed so you can export it right from the console. As you can see in this example, the old 2007 MP has a version number of 6.1.7221.0.
The next thing I like to do (although it’s entirely optional) is to take a copy of the existing Operations Manager 2012 R2 Microsoft.SystemCenter.Notifications.Internal MP just in case of any issues you can simply import it back into SCOM and everything is back to normal. Notice the version number of my MP (SCOM 2012 R2 UR6 is what I have installed)… the version number is 7.1.10226.0.
Ok now we have 2 copies of our Microsoft.SystemCenter.Notifications.Internal MP’s. Personally, I store them both away now and make another copy of the original 2007 one…this is the one that I’ll edit.
Now’s there’s really only a couple of steps here.
- Increment the version number
- Change all Subcriptions to be turned off (Optional)
- Import the Management Pack into 2012
Increment the Version Number
So the first thing to do is to Increment the Version number. Since this is an unsealed Management Pack we’ll have to import the new one we’re modifying with a higher version number. So we’ll change 6.1.7221.0 to 7.1.10226.1. Remember that our current Notifications MP in the newer 2012 R2 environment already has an MP with the version number 7.1.10226.0, so we’ll need to increment this by any value as long as its higher. 1 is enough.
Turn off Subscriptions
The next step which is optional is to effectively turn off all of the subscriptions. You might choose not to perform this step if your plan is to have Operations Manager start alerting via notifications immediately. If this is the case just import the Management Pack. But most likely if you’re migrating you’ll want to turn off notifications and then enable them when you plan to ‘go live’ with the new environment.
You can off course turn them all off (manually or using PowerShell using “Get-SCOMNotificationSubscription | Disable-SCOMNotificationSubscription“) after you’ve installed the Management Pack, but it’s easier to avoid any issues and turn them off now before you install it.
So with the new Notifications file open in Notepad, simply hit Control-H to do a Replace and replace Enabled=”true” to Enabled=”false”, then click “Replace All”.
Import the Management Pack into 2012
Now save the file and import it into SCOM 2012. You should now have a newer version of the MP as shown.
Once imported you’ll see all of the notifications you had in the old environment in the new one but they’ll all be set to Enabled=”false” and therefore they won’t send notifications.
When you’re ready to turn them on, just head over to Subscriptions in the SCOM Console and right click and choose “Enable”.
Alternatively we can do the reverse bit of PowerShell and enable all subscriptions using the following:
Get-SCOMNotificationSubscription | Enable-SCOMNotificationSubscription
Just remember that if you are doing this notification MP migration during the migration of SCOM and not at the end as the last thing to do that you might not have imported all of your Management Packs. Therefore if you have subscriptions that target rules or monitors that don’t exist in your environment (because you haven’t yet installed the MP) then the subscription criteria won’t show the appropriate criteria you’ve set.