Welcome to Aquilaweb

MVP David Allen's weblog advising on
System Center Operations Manager

Restart Service Recovery Task

"After creating a Windows service monitor, how does one configure a recovery task to automatically start the service on failure?" is a question I have been asked many times and seen asked on forums, so I have put together this quick blog on how to do it.


This just covers the Recovery Task, not the creation of the whole monitor.



1. Locate your monitor, right click and select Properties. This example is using the Messenger service.

Monitors









2. Select the Diagnostic and Recovery tab, then select Add under Configure recovery tasks and click Recovery for critical health state.



3. The Create Recovery Task Wizard will open, select Run Command as the type of Recovery task to create and then select a destination Management Pack. Click Next.

Create Recovery Task



4. Give your recovery task a name and description if required. Select the health state for which the recovery action will run and recovery target to what is relevant for your monitor. Make sure the Run recovery automatically is checked if you want the task to run automatically. Click Next.

Task General



5. In Full path to file type the command %windir%\System32\net.exe. In Parameters, type start Messenger, obviously replace Messenger with relevant service. Set working directory as '%Windir%' and set an appropriate timeout based on how long the service usually takes to start. Click Create.

Task Configuration



6. There isn't a stage 6, you're done. :-)



If you want to test that the recovery action works, simply stop the service you are monitoring and watch it start back up again.


05 Jun, 2008 | David



« Prev item - Next Item »
---------------------------------------------

Comments


Hi David! Unless I've missed something, this can only be applied to an unsealed MP. I tried to set one up to restart the SIte Component Manager service for SMS 2003 and got that helpful error msg about accessing object from within a sealed MP. Do I have to un-seal the SMS MP or is there another option?

Rod Lauder - 29 Jan, 2009 - 15:07:37
--------------------------


Hi Rod,

This recovery action can be applied to monitors in sealed MPs as the recovery action itself is stored in an unsealed MP. Are you overriding the monitor for a class, group or object? If you are overriding by group and the group is in a separate unsealed MP, you will receive an error as an unsealed MP cannot reference another unsealed MP.

Please keep me updated.

David

David - 30 Jan, 2009 - 14:47:33
--------------------------




Leave comment

This item is closed, it's not possible to add new comments to it or to vote on it