<?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>Maartendamen&#039;s blog &#187; alerts</title>
	<atom:link href="http://www.maartendamen.com/tag/alerts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maartendamen.com</link>
	<description>Blogging on various IT subjects</description>
	<lastBuildDate>Tue, 22 Nov 2011 21:27:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to trace SCCM&#8217;s management pack alerts to concrete SCCM errors</title>
		<link>http://www.maartendamen.com/2010/03/how-to-trace-sccms-management-pack-alerts-to-concrete-sccm-errors/</link>
		<comments>http://www.maartendamen.com/2010/03/how-to-trace-sccms-management-pack-alerts-to-concrete-sccm-errors/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 18:11:44 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[SCCM]]></category>
		<category><![CDATA[SCOM]]></category>
		<category><![CDATA[alerts]]></category>
		<category><![CDATA[microsoft]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=234</guid>
		<description><![CDATA[Sometimes it&#8217;s a bit tricky to relate events generated by the SCCM management pack for SCOM to real SCCM errors. This article helps you to trace down the real SCCM error by using a real world example.. Let&#8217;s start by looking at the alert generated by the management pack in the SCOM console: Notice the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s a bit tricky to relate events generated by the SCCM management pack for SCOM to real SCCM errors.<br />
This article helps you to trace down the real SCCM error by using a real world example..</p>
<p><span id="more-234"></span></p>
<p>Let&#8217;s start by looking at the alert generated by the management pack in the SCOM console:</p>
<p><img class="alignnone size-full wp-image-236" title="sccm_error" src="http://www.maartendamen.com/wp-content/uploads/2010/03/sccm_error1.png" alt="sccm_error" width="650" height="458" /></p>
<p>Notice the two items marked:</p>
<ul>
<li>Component</li>
<li>Message ID</li>
</ul>
<p>In this example the component affected is SMS_DISTRIBUTION_MANAGER and the message ID is 2302.<br />
Now let&#8217;s start the SCCM management console, drill down to Site Database -&gt; System Status -&gt; Site Status -&gt; Your site name -&gt; Component Status.</p>
<p><img class="alignnone size-full wp-image-237" title="sccm_error4" src="http://www.maartendamen.com/wp-content/uploads/2010/03/sccm_error4.png" alt="sccm_error4" width="389" height="224" /></p>
<p>The right pane should now give you a list of all the SCCM components,  note the SMS_DISTRIBUTION_MANAGER and the error count:</p>
<p><img class="alignnone size-full wp-image-239" title="sccm_error3" src="http://www.maartendamen.com/wp-content/uploads/2010/03/sccm_error3.png" alt="sccm_error3" width="650" height="198" /></p>
<p>Now right click the component with errors and select &#8220;Show Messages -&gt; All&#8221;<br />
A message status viewer will now popup showing some detailed information about the error:</p>
<p><img class="alignnone size-full wp-image-240" title="sccm_error2" src="http://www.maartendamen.com/wp-content/uploads/2010/03/sccm_error2.png" alt="sccm_error2" width="592" height="181" /></p>
<p>Note that the message ID of the error reported by the management pack is listed here. This should give you some in-depth information about the error.<br />
I hope this article helps you to trace alerts generated by SCOM down to the real SCCM errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2010/03/how-to-trace-sccms-management-pack-alerts-to-concrete-sccm-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SCOM alert notification subscription delay sending for x minutes and don&#8217;t sent if alert is auto-resolved within that time</title>
		<link>http://www.maartendamen.com/2009/12/scom-alert-notification-subscription-delay-sending-for-x-minutes-and-dont-sent-if-alert-is-auto-resolved-within-that-time/</link>
		<comments>http://www.maartendamen.com/2009/12/scom-alert-notification-subscription-delay-sending-for-x-minutes-and-dont-sent-if-alert-is-auto-resolved-within-that-time/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 10:52:24 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[SCOM]]></category>
		<category><![CDATA[alerts]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[notifications]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.maartendamen.com/?p=40</guid>
		<description><![CDATA[In my company we are using SCOM for monitoring our server environment. Off hours we also get notified about critical alerts using a SMS/GSM modem. Using default SCOM functionality we delay the sending of notifications by 5 minutes. This works fine for alerts with a &#8220;new&#8221; state. However if an alert is closed within the [...]]]></description>
			<content:encoded><![CDATA[<p>In my company we are using SCOM for monitoring our server environment.<br />
Off hours we also get notified about critical alerts using a SMS/GSM modem.<br />
Using default SCOM functionality we delay the sending of notifications by 5 minutes. This works fine for alerts with a &#8220;new&#8221; state.<br />
However if an alert is closed within the 5 minute period a &#8220;closed&#8221; notification is sent out.<br />
We do not want to see the closed alerts if an alert auto-resolved within the 5 minute time period.  But if a new alert that has aged 5 minutes and sent to our GSM, we definately want to see that closed alert if it auto/manual resolves into the closed state (to make sure someone actually did something about the alert)</p>
<p>Using default SCOM functionality, this is not possible. This is why we came up with the following idea (special thanks to my colleague Frank):</p>
<ul>
<li>Using two seperate subscriptions, one for &#8220;new&#8221; alerts and one for &#8220;closed&#8221; alerts.</li>
<li> On the new alert subscription set a channel with a powershell script to update custom field 1 when a SMS has been sent (this subscription has the 5 minute delay)</li>
<li>On the closed alert subscription set a condition to check custom field 1 to see wheter a SMS has been sent or not.</li>
</ul>
<p>This blog post describes how this can be done within SCOM.</p>
<p><span id="more-40"></span></p>
<p><strong>1. The Command Notification Channel<br />
</strong></p>
<p>First we have to create a &#8220;Command Notification Channel&#8221;. Go to the &#8220;Administration&#8221; section of the SCOM management console. Click on Notifications-&gt;Channels.<br />
Right click and select &#8220;New-&gt;Command&#8230;&#8221;.<br />
The following wizard appears:</p>
<p><img class="size-full wp-image-45 alignnone" style="margin: 10px 0px;" title="Command Notification Channel Wizard #1" src="http://www.maartendamen.com/wp-content/uploads/2009/12/scom_cmdnot1.png" alt="Command Notification Channel Wizard #1" width="680" height="244" /></p>
<p>Give the channel a name, and click &#8220;Next &gt;&#8221;</p>
<p>Enter the following settings for the channel:</p>
<p><strong>Full path of the command file:</strong><br />
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe<br />
<strong>Command line parameters:<br />
</strong><em> </em>-Command &#8220;&amp; D:\Scripts\UpdateAlertCustomField.ps1 -alertid:&#8221;$Data/Context/DataItem/AlertId$&#8221;"<br />
<strong>Startup folder for the command line:</strong><br />
D:\Scripts</p>
<p>Change D:\Scripts to reflect your PowerShell script location. It should now look like this:</p>
<p><img class="size-full wp-image-46 alignnone" title="Command Notification Channel Wizard #2" src="http://www.maartendamen.com/wp-content/uploads/2009/12/scom_cmdnot2.png" alt="Command Notification Channel Wizard #2" width="468" height="167" /></p>
<p>Save the changes by clicking &#8220;Finish&#8221;</p>
<p><strong>2. The used PowerShell script</strong></p>
<p>To modify alert &#8220;custom field 1&#8243;, I use a small PowerShell script. The text written into the field is &#8220;Notification sent out&#8221;<br />
The used script is displayed here, save this script as &#8220;UpdateAlertCustomField.ps1&#8243; in the directory specified in the command notification channel above.</p>
<pre class="brush: powershell; title: ; notranslate">
# Get alertid parameter
Param($alertid)
$alertid = $alertid.toString()

# Load SCOM snap-inn
add-pssnapin &quot;Microsoft.EnterpriseManagement.OperationsManager.Client&quot;;
$server = &quot;localhost&quot;

# Connect to SCOM
new-managementGroupConnection -ConnectionString:$server;
set-location &quot;OperationsManagerMonitoring::&quot;;

# Update alert custom field
$alert = Get-Alert -id $alertid
$alert.CustomField1 = &quot;Notification sent out&quot;
$alert.Update(&quot;Custom field 1 updated by UpdateAlertCustomField script&quot;)
</pre>
<p><strong>3. A subscriber for the command</strong></p>
<p>The next step is to create a subscriber which has the command notification channel created above assigned as channel.<br />
Go to the &#8220;Administration&#8221; section of the SCOM management console. Click on Notifications-&gt;Subscribers.<br />
Right click and click &#8220;New&#8230;&#8221;</p>
<p>In the &#8220;Notification Subscriber Wizard&#8221; give the new subscriber a name. In the next step of the wizard, specify your schedule as desired.<br />
On the &#8220;Addresses&#8221; step, click &#8220;Add&#8230;&#8221; to add a new address.</p>
<p><img class="alignnone size-full wp-image-72" title="scom_notsub_add" src="http://www.maartendamen.com/wp-content/uploads/2009/12/scom_notsub_add.png" alt="scom_notsub_add" width="680" height="311" /></p>
<p>In the &#8220;Subscriber Address&#8221; wizard, specify a name for the new subscriber. This can be virtually anything as no e-mails/pages/SMS messages are sent anyway.<br />
Next, specify the &#8220;Command&#8221; channel type and select the Command channel we created earlier (Update custom field 1).</p>
<p><img class="alignnone size-full wp-image-73" title="scom_subaddr" src="http://www.maartendamen.com/wp-content/uploads/2009/12/scom_subaddr.png" alt="scom_subaddr" width="677" height="351" /></p>
<p>Specify your schedule as desired, click &#8220;Finish&#8221; to end the wizard. Click &#8220;Finish&#8221; again to close the &#8220;Notification Subscriber Wizard&#8221;.<br />
You should now have a subscriber with the command channel as asigned channel.</p>
<p><strong>4. The subscription for new alerts</strong></p>
<p><strong></strong>Now that we have the command notification channel, powershell script and subscriber ready. We can create a new subscription for new alerts.<br />
Go to the &#8220;Administration&#8221; section of the SCOM management console. Click on Notifications-&gt;Subscriptions.</p>
<p>In the &#8220;Notification Subscription Wizard&#8221; specify a name for the new subscription. The next wizard step is the step to define criteria for the subscription.<br />
Specify atleast the &#8220;with specific resolution state&#8221; criteria, offcourse you can add your own other criteria here like you would normally do.</p>
<p><img class="alignnone size-full wp-image-74" title="scom_notsub_wi" src="http://www.maartendamen.com/wp-content/uploads/2009/12/scom_notsub_wi.png" alt="scom_notsub_wi" width="489" height="365" /></p>
<p>On the next wizard page (Subscribers) add the command subscriber we created in step 3, as shown below.</p>
<p><img class="alignnone size-full wp-image-75" title="scom_subaddr_wi2" src="http://www.maartendamen.com/wp-content/uploads/2009/12/scom_subaddr_wi2.png" alt="scom_subaddr_wi2" width="477" height="237" /></p>
<p>In the next wizard step (Channels) add the command channel we created in step 1 and specify the desired delay (5 minutes in this case). As shown below:</p>
<p><img class="alignnone size-full wp-image-76" title="scom_delay" src="http://www.maartendamen.com/wp-content/uploads/2009/12/scom_delay.png" alt="scom_delay" width="476" height="474" /></p>
<p>Click &#8220;Next&#8221;, in the summary step make sure &#8220;Enable this notification subscription&#8221; is checked and click &#8220;Finish&#8221;.<br />
You should now have an subscription ready for new SCOM alerts.</p>
<p><strong>5. Subscription for closed alerts</strong></p>
<p>You can create the subscription channel like you would normally do. The only important step is to get the criteria right. We have to include custom field 1.<br />
This is how the closed subscription criteria look:</p>
<p><img class="alignnone size-full wp-image-79" title="scom_notcustom" src="http://www.maartendamen.com/wp-content/uploads/2009/12/scom_notcustom.png" alt="scom_notcustom" width="483" height="393" /></p>
<p><span style="text-decoration: underline;"><strong>NOTE: there is currently a bug in SCOM R2 when using custom fields in a subscription criteria!</strong></span></p>
<p>For more information about thihs bug visit the following URL:</p>
<p><a href="http://social.technet.microsoft.com/Forums/en/operationsmanagergeneral/thread/260be16a-0f45-4904-8093-7c1caa5ed546">http://social.technet.microsoft.com/Forums/en/operationsmanagergeneral/thread/260be16a-0f45-4904-8093-7c1caa5ed546</a></p>
<p><span style="text-decoration: underline;">You have to update the xml file each time you change something in either of the notifications!</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.maartendamen.com/2009/12/scom-alert-notification-subscription-delay-sending-for-x-minutes-and-dont-sent-if-alert-is-auto-resolved-within-that-time/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

