You are browsing the archive for 2011 June.

SCOM 2007: How to backup your SCOM IIS settings

8:05 am in Uncategorized by Dieter Wijckmans

This blog post is part of a series how to backup your SCOM environment.

You can find the other parts here:


 

There are 2 versions supported in SCOM and they both need a different approach to backup.

IIS6 is normally used if you are running SCOM 2007R2 on a Windows 2003 platform. It is used to support the components of the web console and the SQL Server Reporting Services. If you are using SQL Server Reporting Services from SQL 2008 IIS is not used anymore and it is just sufficient to backup the dbases.

IIS7 is normally used if you are running SCOM 2007R2 on a Windows 2008 platform (it can also run on a windows 2003 server but is not installed by default). The approach to backup IIS7 is somewhat different as it stores it’s data differently. The files you need to backup are web.config files and the applicationhost.config files. For more info on how to backup IIS 7 you can read this nice reference:  http://blogs.iis.net/bills/archive/2008/03/24/how-to-backup-restore-iis7-configuration.aspx

So let’s start with the backup shall we:

Backup IIS6

Connect to the RMS and navigate to Start > administrative Tools > Internet Information Services (IIS) Manager

scom_02

Right click the server name and navigate to “All Tasks” > “Backup/restore Configuration…”

scom_04scom_05

The configuration backup dialog box will come up.

scom_06

Fill in a backup name and if you want to make a secure backup you can tick the box “Encrypt Backup using password” and supply a password for the backup.scom_07

Click OK and your backup is made…

The actual backup file is stored in “%systemroot%\system32\inetsrv\MetaBack

scom_08

I suggest you take a copy of this file in case your RMS is unrecoverable. Otherwise the file itself which resides on the server will also be gone and what’s the point in backing up then Smile

Backup IIS 7

Open an elevated prompt on your RMSscom_backup_encryption0014

Navigate to %windir%\system32\inetsrvscom_backup_encryption0015

Run the command “appcmd add backup “name of your backup set”. If you not specify a name a name will be generated with the date and time.

scom_backup_encryption0016

If you are using IIS 7 your live just became a little bit easier. If you are using Vista SP1 or later / Windows Server 2008 the backup is automatically done if you create an initial backup like shown below. IIS automatically makes a history snapshot of ApplicationHost.config each time it detects a change so you can easily restore a prior version. By default it will keep 10 prior versions and checks every 2 minutes.

The files are stored in “%systemdrive%\inetpub\history

Pretty cool feature if you ask me and a big improvement from the previous version.

To enumerate a list of backups and configuration history files, use the following command:

“%windir%\system32\inetsrv\appcmd.exe list backup”

SCOM 2007: How to backup your encryption key

12:30 pm in Uncategorized by Dieter Wijckmans

This blog post is part of a series how to backup your SCOM environment.

You can find the other parts here:


 

One of the key factors in a successful restore of your environment is the SCOM encryption key.

Purpose of the key

This encryption key is used to store the data in the Operations manager dbase. It’s ensuring that the data in the dbase remains confidential and encrypted. The RMS uses this keep to read and write data to the Operations Manager dbase.

Implications of you don’t have the key at hand when restoring a Management group

Pretty severe actually. If you don’t have the key you can’t establish connection from your fresh RMS to your existing Operations Manager dbase and therefore you loose all your settings, customizations and have to start all over again.

Please note that’s it’s a best practice to take this backup once after installation of the environment and after ANY changes to the RunAs accounts in the environment.

So how do you back this key up in case Murphy pays you a visit

There are actually 2 ways: GUI or command line

GUI

Log on to your RMS with an account with admin privileges

Open an elevated command prompt and navigate to your Operations manager install folder. In this case I kept it at default so c:\program files\system center operation manager 2007\

scom_backup_encryption0000Run securestoragebackup.exe

scom_backup_encryption0007

Note: Securestoragebackup.exe is only installed if you have installed a console on your RMS. If not you need to copy the securestoragebackup.exe file from the SupportTools folder from the installation media

The Encryption Key Backup or Restore Wizard pops up:scom_backup_encryption0001

Click continue and select Backup the Encryption key.

scom_backup_encryption0002

A dialog box will appear to save your bin file. Best practice is to not save the file on the RMS. This makes perfect sense because you’ll need the file when there’s an issue with your RMS so there’s a big chance you can not reach the file.

I always save it on my file server and keep an extra copy somewhere else just to be save. As soon as you have exported the key you can make a copy of the bin file and store it twice on different locations.

scom_backup_encryption0003

So the location is set let’s continue.

scom_backup_encryption0004

Fill in a password to secure the backup bin file. Make sure you remember the password in X amount of time when you’ll need it to restore the key.

scom_backup_encryption0005

It will take no more than a few seconds to backup the key and if all goes well a nice complete message appear.

scom_backup_encryption0006

 

Via Command line:

Log on to your RMS with an account with admin privileges

Open an elevated command prompt and navigate to your Operations manager install folder. In this case I kept it at default so c:\program files\system center operation manager 2007\

scom_backup_encryption0000

scom_backup_encryption0007Run securestoragebackup.exe /? to get the syntax of the command.

The command used: securestoragebackup backup <filename>

scom_backup_encryption0008

You need to supply the password twice

scom_backup_encryption0011

and the second time

scom_backup_encryption0012

And the key was successfully backed up.

Downside is you cannot automate this process without further scripting because you need to put in a password. Would be nice that it would be an option in the exe to give your password as a parameter but maybe in another release Smile

SCOM 2007: Convert MOM2005 management pack guide

8:29 pm in Uncategorized by Dieter Wijckmans

Recently I was working on a migration from MOM2005 towards SCOM2007R2. Unfortunately the MOM2005toSCOM2007 migration tool which was included in the SCOM2007 install media was not working anymore so I had to convert the management packs manually.

This post is for my reference whenever I need it again but in my search on the web I did not find many good write-ups so I wrote one of my own.

Case

I needed a Microsoft Biztalk 2004 management pack in SCOM 2007. Unfortunately Microsoft never released a SCOM 2007 management pack but only a MOM2005 one.

So I had to convert it and load it into SCOM.

I’ve downloaded the management pack here: http://www.microsoft.com/download/en/details.aspx?id=14417

It’s an exe file which you need to unzip to a folder of your choice. I this example I’m going to put it on c:\managementpacks .

The file you need for the initial conversion is “c:\managementpacks\microsoft biztalk server 2004 management pack\Microsoft Biztalk Server 2004.AKM”

Convert to XML

Next we need to convert the management pack to a valid XML file format which is used by Scom 2007.

You need MP2XML.exe to perform this conversion. It’s part of the MOM2005Resourcekit.

The syntax: C:\program files\microsoft operations manager resource kit\tools\convert management packs to xml\mp2xml.exe “inputfile”.akm “outputfile”.xml

so in this case C:\program files\microsoft operations manager resource kit\tools\convert management packs to xml\mp2xml.exe “c:\managementpacks\microsoft biztalk server 2004.akm” “c:\managementpacks\microsoft_biztalk_server_2004.xml”

convertmp01_1

Note the underscores in the naming. It’s not allowed to have spaces in the name of the XML file.

Convert XML to SCOM2007 format

Next thing we need to do is convert the actual XML file to SCOM2007 format.

This is achieved with the mpconvert.exe which resides on the RMS in c:\program files\System center Operations manager2007\mpconvert.exe

The syntax in our example is: c:\program files\system center operations manager 2007\mpconvert.exe “c:\managementpacks\microsoft_biztalk_server_2004.xml” “c:\managementpacks\microsoft_biztalk_server_2004_converted.xml”

convertmp01_2

Now you can load the xml in SCOM like you load any other management pack.

Import MP in SCOM2007R2

There was an error with this particular management pack resulting in a failure of the import. Turned out there was an issue with the XML.

If you want to import the management pack you get the following error:

convertmp02

XSD Verification failed for management pack. The ‘Name’ element is invalid. This is an issue in the XML itself. A parameter which needs to be present in the XML is either corrupt or missing.

I’ve installed XML notepad 2007 on my machine to check the xml file.

You can download this nice tool here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=7973

Now if you look in the XML you browse down to the manifest > name field you immediately notice that the field is empty:

convertmp03

You can just fill in a name at the right like I did below:

convertmp04

Save the file and try to import the management pack again.

convertmp05

This time it’s working and it let’s you continue with the import.

In this example a standard mp without any customization was used from Microsoft. However during my migration I had a lot of mp’s which were full of custom rules.

I ‘ll create a Powershell script to automate this process and post it as a follow up on this blog.

If you have any questions please feel free to leave a comment or shoot me a mail.

SCOM 2007: How to backup your dbases

8:30 am in Uncategorized by Dieter Wijckmans

This blog post is part of a series how to backup your SCOM environment.

You can find the other parts here:


 

In order to keep the possibility to restore your SCOM environment in case of a disaster you need to make sure that you have a good backup of your dbases.

Your dbases keep track of all the info in your environment so it’s crucial that you don’t loose these valuable assets of your environment.

A good backup strategy of your SQL dbases is crucial as you need to make sure that you always have a recent copy at hand.

If you have a backup admin in your environment and are using a backup product like Data Protection Manager it’s best to meet up with the admin to check how his SQL backup schedule is configured. If he’s confident that he provides your backups no need to backup them twice…

If not you’ll need to perform the backup yourself.

First of all a small word about the different options you have to backup a SQL dbase (this applies to all SQL dbases and is not SCOM specific)

  1. Full backup: This is self explanatory actually. You take a full backup of your dbase. In case of a restore the existing dbase will be overwritten and rolled back to the point in time where the backup was taken. This consumes the most storage space.
  2. Incremental backup: This method backs up all the differences since the last database backup. With this method you have more flexibility to do a point in time restore. It takes less space but can be more time consuming to restore.
  3. Transaction log backups: With this method you just take a backup of all the changes to the dbase since the last transaction log. This method is fast and safes some storage space but can be a hassle to restore.

A good mix of the 3 methods above is a good strategy. I always take a full backup of the operations dbase once a week (datawarehouse once a month), a incremental backup once a day (for datawarehouse once a week) and Transaction log backups every 2 hours.

Again you can skip the Transaction log backups but then you risk to loose a max of 23h59m of data.

So let’s get the backups up and running:

We’re going to create the full backup schedule for Operations dbase in this example:

Connect to the dbase.

scom_backup_dbase0001

Open the tree and go to the “OperationsManager” dbase > right click > Tasks > Back Up…

scom_backup_dbase0003

  • Select the OperationManager dbase
  • Leave backup type at full
  • Fill in a name of the backup set
  • Click backup to disk and choose Add to create the file
  • Set the expiration. I choose 40 days but again this can change according to your requirements.

scom_backup_dbase0005

Choose Options in the left pane and set:

Verify backup when finished

scom_backup_dbase0007

When all the settings are correctly configured choose Script button at the top of the page and choose “Script action to Job”.

scom_backup_dbase0008

This will generate a SQL job which you can schedule in the SQL agent so it can fire the backup when needed.

Name the job: In this case “Back up Database – OperationsManager_weekly”

scom_backup_dbase0009

Choose Schedules in the left pane and select New at the bottom:

scom_backup_dbase0010

Name the schedule and define the frequency + schedule. This will be scheduled in the SQL agent jobs.scom_backup_dbase0011

When your schedule is made > click ok and the job is created.

scom_backup_dbase0014

You can check this job in the SQL Server Agent under the tree Jobs…

scom_backup_dbase0015

This is for the Weekly full of the Operation manager dbase.

You need to complete the same steps to perform the backup schedules for your other dbases.

SCOM 2007: How to backup your environment

8:07 am in Uncategorized by Dieter Wijckmans

The funny thing is most of the admins think of backups just after they had a major crash and there were no backups available.

Most of the admin’s think backups are a hassle and they take some but loose interest in the long term. When disaster strikes they miss a vital piece to restore their environment, have an outdated backup or even worse… no backup at all.

In this series of blogs I’ll go over the different aspects of backing up your SCOM2007 environment to make sure that when Murphy is choosing you, you’re prepared…

One of my favorite cartoons to illustrate backups…

backup

So let’s get started and get you prepared when disaster strikes.

Which components do you need for a successful restore of your environment:

This blog post is part of a series how to backup your SCOM environment.

  1. How to backup your SCOM environment
  2. How to backup your SCOM dbases
  3. How to backup your SCOM encryption key
  4. How to backup your SCOM IIS settings
  5. How to backup your unsealed management packs
  6. How to Document your SCOM installation
  7. How to Backup your Reporting

This series of blogs will be divided in the categories shown above and will be linked back to this post.

SCOM: Target a rule or monitor to a computer group

1:51 pm in Uncategorized by Dieter Wijckmans

Today I had to explain to a customer how you need to target a rule or monitor to a specific computer group.

This is actually not a very intuitive process and if you are used to work with MOM2005 the process is different and can have big implications in the behavior of the rule / monitor you’ve created.

This is the only correct way if you want to target a rule or monitor to a select group of server.

Create your rule:

Open your console and go to the tab Authoring and navigate to the Rules. Right Click > Create a new rule…

scom_rule_computergroup0000

In the “Create Rule Wizard” select the desired rule. In this example I’m going to create an Event Based rule in the NT Event Log (Alert).

CAUTION: make sure to change the destination management pack to a custom management pack and NOT the default management pack.

scom_rule_computergroup0001

Give the rule name and click the “Select” button just behind Rule Target:

scom_rule_computergroup0002

Here you need to target a class of which you are certain all the servers you want to target are part of. In this case I choose “Windows Server” but if you are for example convinced they are all SQL server you can target the “SQL server” class.

scom_rule_computergroup0004

If you have selected the appropriate class hit ok but not next on the page.

Make sure the “Rule is enabled” tick box is off!

scom_rule_computergroup0003

Now choose the event log where to target your rule. In our case it’s the Application log

scom_rule_computergroup0005

The filter. In this example I’m searching for an Event ID 150 created by the source “Eventcreate”

scom_rule_computergroup0006

Next thing is to specify the information that will be generated by the alert:

scom_rule_computergroup0007

Now click create.

Create your Group

So far the rule has been created but is disabled. The next thing we need to do is create our group which contains the specific set of servers which need to be targeted. In the Authoring pane choose “Groups” > Right click > choose “Create a new Group…”

scom_rule_computergroup0008

Choose a name for the group and again CHANGE the default management pack as a target.

NOTE: Choose the same management pack where you want to create your override in later on. It’s not possible to reference another unsealed group from a unsealed group so either use the same group for both your override and group or seal the management pack where your group is created in.

scom_rule_computergroup0009

The next option is to specify the explicit group members.

There are actually 2 approaches to populating the group (which can be combined).

The first one is that you specify the explicit members of the group. They will be always in the group included no matter what criteria you specify later on. The disadvantage you have is if you install a new server which need to be targeted you have to manually include it here.

scom_rule_computergroup0010

The second approach to populate your group is Dynamic Inclusion rules. These rules have a set of conditions to add servers. These can be for example all servers which are SQL servers based on the class or all servers which name starts with “SERVER0”.

scom_rule_computergroup0011

You can also specify servers to be included in this group which reside in another group.

scom_rule_computergroup0012

Specifically deny Objects from being included in the group:

scom_rule_computergroup0013

When you are confident you have included all the servers in the groups click create.

Create your override for the rule

At this point go back to the Authoring pane > Rules > search for your new created rule.

In this example you can see our newly created rule in disabled state:

scom_rule_computergroup0014

Right click the rule and choose Overrides > Override the Rule > For a Group…

scom_rule_computergroup0019

Now choose the group we created earlier on:

scom_rule_computergroup0015

In the override parameter locate the “Enabled” parameter and tick the box in the “Override” column. In the Override Value choose “True” , click Apply and OK.

scom_rule_computergroup0017

At this point the rule we have created is targeted only to the servers you’ve added to the computer group and not enabled on all the other servers. This is in face a total different approach from the way of working in MOM2005.

This is because the computer groups (The class of objects that are computer groups) only exist on the RMS. If you target a rule directly to a computer group it will try to collect info from the RMS instead of the computers you have intended.