<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brad&#039;s Tech Blog &#187; Recovery Task</title>
	<atom:link href="http://bradstechblog.com/tag/recovery-task/feed" rel="self" type="application/rss+xml" />
	<link>http://bradstechblog.com</link>
	<description>Microsoft technologies like: System Center Operations Manager, and whatever else comes up at the office.</description>
	<lastBuildDate>Sat, 13 Feb 2010 01:59:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to create a Recovery task in SCOM on a windows service.</title>
		<link>http://bradstechblog.com/scom/how-to-create-a-recovery-task-in-scom-on-a-windows-service</link>
		<comments>http://bradstechblog.com/scom/how-to-create-a-recovery-task-in-scom-on-a-windows-service#comments</comments>
		<pubDate>Wed, 01 Oct 2008 17:34:58 +0000</pubDate>
		<dc:creator>Brad Hearn</dc:creator>
				<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[SCOM]]></category>
		<category><![CDATA[System Center Operations Manager]]></category>
		<category><![CDATA[Monitors]]></category>
		<category><![CDATA[Recovery Task]]></category>

		<guid isPermaLink="false">http://bradstechblog.com/?p=205</guid>
		<description><![CDATA[When you have the requirement to monitor a windows service through Microsoft&#8217;s System Center Operations Manger and have it restarted automatically you can not use the management pack templates. The reason for this is that the templates are stored in locked MP&#8217;s that you do not have access too.
Follow the following steps to monitor a [...]]]></description>
			<content:encoded><![CDATA[<p>When you have the requirement to monitor a windows service through Microsoft&#8217;s System Center Operations Manger and have it restarted automatically you can not use the management pack templates. The reason for this is that the templates are stored in locked MP&#8217;s that you do not have access too.</p>
<p>Follow the following steps to monitor a service and have it restarted automatically by SCOM if it fails.<br />
<!--smartads--><br />
<span id="more-205"></span></p>
<p><strong>Steps</strong></p>
<ol>
<blockquote>
<li>Create a management pack to store the monitor in</li>
<li>Create a group that the monitor will be applied against</li>
<li>Create a monitor that watches the service</li>
<li>Create overrides (apply to group)</li>
<li>Create the recovery task</li>
</blockquote>
</ol>
<p><strong>Step 1: Create the Management Pack<br />
</strong></p>
<p>In the managment console under Administration right click on Management Packs and select &#8220;Create Management Pack&#8221;. Give this new MP a meaningfull name and continue.</p>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/label_mp1.png"><img class="alignnone size-medium wp-image-206" title="create_new_mp" src="http://bradstechblog.com/wp-content/uploads/2008/09/create_new_mp-300x199.png" alt="" width="300" height="199" /></a></p>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/label_mp1.png"> </a></p>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/label_mp1.png"><img class="alignnone size-medium wp-image-208" title="label_mp1" src="http://bradstechblog.com/wp-content/uploads/2008/09/label_mp1-300x264.png" alt="" width="300" height="264" /></a></p>
<p><strong>Step 2: Create the Group<br />
</strong></p>
<ul>
<li>In the Authoring Pane right click on &#8220;create new group&#8221; Give this new group a meaningful name. A description. And select the management pack that you created.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/label_group.png"> <img class="alignnone size-medium wp-image-209" title="create_new_group" src="http://bradstechblog.com/wp-content/uploads/2008/09/create_new_group-81x300.png" alt="" width="81" height="300" /></a></p>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/label_group.png"> </a></p>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/label_group.png"><img class="alignnone size-medium wp-image-210" title="label_group" src="http://bradstechblog.com/wp-content/uploads/2008/09/label_group-300x257.png" alt="" width="300" height="257" /></a></p>
<blockquote><p>Important: Do not use the default management pack. You can do it. But this will create problems when trying to remove MP in the future. Always use Custom MP&#8217;s.</p></blockquote>
<ul>
<li>Say next. Click on Add/remove objects on the Explicit Group Members. Enter a server name and search. Select your computer object and say ok. You can now add dynamic and exclusions. I am not going into that on this post so except all defaults.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/explicit_members.png"><img class="alignnone size-medium wp-image-211" title="explicit_members" src="http://bradstechblog.com/wp-content/uploads/2008/09/explicit_members-300x291.png" alt="" width="300" height="291" /></a><br />
<!--smartads--><br />
<strong>Step 3</strong>: <strong>Create the Monitor</strong></p>
<ul>
<li>In the Authoring Pane right click on monitors and select Create a monitor, then Unit Monitor.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/create_unitmonitor.png"><img class="alignnone size-medium wp-image-212" title="create_unitmonitor" src="http://bradstechblog.com/wp-content/uploads/2008/09/create_unitmonitor-300x171.png" alt="" width="300" height="171" /></a></p>
<ul>
<li>Expand Windows Services, and select &#8220;Basic Service Monitor&#8221;. Select the custom management pack.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/select_monitor_type.png"><img class="alignnone size-medium wp-image-213" title="select_monitor_type" src="http://bradstechblog.com/wp-content/uploads/2008/09/select_monitor_type-300x293.png" alt="" width="300" height="293" /></a></p>
<ul>
<li>Provide a name for the monitor. I am going to create this monitor to watch Windows Update services. Select the monitor target as windows Server Operating System. Select the Parent Monitor as Availability.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/monitor_general_properties.png"><img class="alignnone size-medium wp-image-214" title="monitor_general_properties" src="http://bradstechblog.com/wp-content/uploads/2008/09/monitor_general_properties-300x294.png" alt="" width="300" height="294" /></a><a href="http://bradstechblog.com/wp-content/uploads/2008/09/monitor-target.png"><img class="alignnone size-medium wp-image-216" title="monitor-target" src="http://bradstechblog.com/wp-content/uploads/2008/09/monitor-target-300x259.png" alt="" width="300" height="259" /></a></p>
<ul>
<li>Next Browse to the server, or any server with the service running. and select the service.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/select_service.png"><img class="alignnone size-medium wp-image-218" title="select_service" src="http://bradstechblog.com/wp-content/uploads/2008/09/select_service-300x248.png" alt="" width="300" height="248" /></a></p>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/select_service2.png"><img class="alignnone size-medium wp-image-217" title="select_service2" src="http://bradstechblog.com/wp-content/uploads/2008/09/select_service2-300x294.png" alt="" width="300" height="294" /></a></p>
<ul>
<li>The next window shows how the monitor sees the health state. Accept the default.</li>
</ul>
<ul>
<li>The last window is how the alerts are configured.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/configure-alert.png"><img class="alignnone size-medium wp-image-219" title="configure-alert" src="http://bradstechblog.com/wp-content/uploads/2008/09/configure-alert-300x293.png" alt="" width="300" height="293" /></a></p>
<ul>
<li>uncheck the &#8220;Generate alerts for this monitor:&#8221; for now. This will prevent any unwanted alerts until we are ready.</li>
</ul>
<p><strong>Step 4: Apply to group</strong></p>
<p>Lets apply this MP against the group that we created earlier and disable it for all other servers.</p>
<p>Fist disable the rule for all servers</p>
<ul>
<li>Find the new rule under Authoring\monitors. The easiest way to do this is to change your scope. Click on the Change scope in the top right corner</li>
<li>Look for windows server operating System and select it and say ok.</li>
</ul>
<p><img src="file:///C:/Temp/moz-screenshot-4.jpg" alt="" /> <a href="http://bradstechblog.com/wp-content/uploads/2008/09/changescope.png"><img class="alignnone size-medium wp-image-220" title="changescope" src="http://bradstechblog.com/wp-content/uploads/2008/09/changescope-300x241.png" alt="" width="300" height="241" /><br />
</a></p>
<ul>
<li>Expand the monitor, right click on it and select properties.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/expandmonitor.png"><img class="alignnone size-medium wp-image-221" title="expandmonitor" src="http://bradstechblog.com/wp-content/uploads/2008/09/expandmonitor-300x132.png" alt="" width="300" height="132" /></a></p>
<ul>
<li>Select Disable and &#8220;For all objects of type: windows Server Operating System&#8221;</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/disable_monitor.png"><img class="alignnone size-medium wp-image-222" title="disable_monitor" src="http://bradstechblog.com/wp-content/uploads/2008/09/disable_monitor-300x206.png" alt="" width="300" height="206" /></a></p>
<ul>
<li>Next Right click on the same monitor and select override, Override the Monitor, for a group</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/override_for_group.png"><img class="alignnone size-medium wp-image-223" title="override_for_group" src="http://bradstechblog.com/wp-content/uploads/2008/09/override_for_group-300x123.png" alt="" width="300" height="123" /></a></p>
<ul>
<li>Start to type the name of the group you created and select it.<br />
<a href="http://bradstechblog.com/wp-content/uploads/2008/09/selectgroup.png"><img class="alignnone size-medium wp-image-225" title="selectgroup" src="http://bradstechblog.com/wp-content/uploads/2008/09/selectgroup-274x300.png" alt="" width="274" height="300" /></a></li>
<li>Place a check beside &#8220;Parameter name&#8221;. Change the override setting to True. This will enable the rule for the group.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/overrideproperties.png"><img class="alignnone size-medium wp-image-224" title="overrideproperties" src="http://bradstechblog.com/wp-content/uploads/2008/09/overrideproperties-289x300.png" alt="" width="289" height="300" /></a></p>
<ul>
<li>Say OK to save.</li>
</ul>
<p><strong>STEP 5: Create Recovery Task</strong></p>
<ul>
<li>In the Authoring Pane right click on monitors and select the monitor you created by right clicking on it and select properties.</li>
<li>Click on the Diagnostic and Recovery Tab</li>
<li>Under the configure recovery Tasks select Add&#8230; and choose &#8220;Recovery for Critical Health State&#8221;<br />
<a href="http://bradstechblog.com/wp-content/uploads/2008/09/select-task.png"><img class="alignnone size-medium wp-image-226" title="select-task" src="http://bradstechblog.com/wp-content/uploads/2008/09/select-task-300x290.png" alt="" width="300" height="290" /></a></li>
<li>Select Run command</li>
<li>Provide a meaningful name and description</li>
<li>Select the recovery target as Windows server operating system</li>
<li>Check run recovery automatically and recalculate monitor state.</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/image-0011.png"><img class="alignnone size-medium wp-image-227" title="task name and description" src="http://bradstechblog.com/wp-content/uploads/2008/09/image-0011-300x269.png" alt="" width="300" height="269" /></a></p>
<ul>
<li>Next, for the full path to the file type C:\WINDOWS\system32\net.exe This will spawn the net command</li>
<li>for the parameters type start service name. We are starting windows update service. Here is the best way to find the service name. Open services by opening the run box and type services.msc</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/services-window.png"><img class="alignnone size-medium wp-image-228" title="services-window" src="http://bradstechblog.com/wp-content/uploads/2008/09/services-window-300x238.png" alt="" width="300" height="238" /></a></p>
<ul>
<li>now that you have the actual service name lets enter it in the parameters field. so you would type &#8220;Start wuauserv&#8221;</li>
</ul>
<p><a href="http://bradstechblog.com/wp-content/uploads/2008/09/image-0013.png"><img class="alignnone size-medium wp-image-229" title="Task command line settngs" src="http://bradstechblog.com/wp-content/uploads/2008/09/image-0013-300x271.png" alt="" width="300" height="271" /></a></p>
<ul>
<li>Once you have clicked on create you are done.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://bradstechblog.com/scom/how-to-create-a-recovery-task-in-scom-on-a-windows-service/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
