<?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>SCOMskills Blog</title>
	<atom:link href="http://scomskills.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://scomskills.com/blog</link>
	<description>bits and pieces related to System Center Operations Manager</description>
	<lastBuildDate>Tue, 23 Apr 2013 05:07:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Get Recursive Group Membership</title>
		<link>http://scomskills.com/blog/?p=412</link>
		<comments>http://scomskills.com/blog/?p=412#comments</comments>
		<pubDate>Tue, 23 Apr 2013 04:57:49 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[TSQL]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=412</guid>
		<description><![CDATA[Sometimes it is necessary to not only return a list of objects contained in a group, but also return all or specific objects nested in a group at different levels. For this we can leverage a built-in store procedure that is in your Operations Manager Data Warehouse. This procedure is used under the hood for [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it is necessary to not only return a list of objects contained in a group, but also return all or specific objects nested in a group at different levels. For this we can leverage a built-in store procedure that is in your Operations Manager Data Warehouse. This procedure is used under the hood for the report group object picker. I&#8217;m simply leveraging it in this example to demonstrate how to get <u>current</u> group membership.</p>
<p>This is a good example group, since it contains several nested group each containing different types of objects.</p>
<p>There are three parameter you can change in this example:</p>
<p>GroupDisplayName = name of group you want to check</p>
<p>LevelCount = how far to look into a nested group scenario (this can also be used to find all hosted objects of group members)</p>
<p>StartLevel = at which level do you want to begin returning group/object membership (e.g.; do not return membership of root group, but start at second level)</p>
<p>This should be executed on your Operations Manager <u>Data Warehouse</u>, not the operational database.</p>
<p>&#160;</p>
<p><span style="color: teal"></span></p>
<pre class="code"><span style="color: blue">DECLARE </span><span style="color: teal">@GroupDisplayName </span><span style="color: blue">as varchar</span><span style="color: gray">(</span><span style="color: magenta">max</span><span style="color: gray">) = </span><span style="color: red">'<font style="background-color: #ffff00">All Operations Manager Objects Group</font>'</span><span style="color: gray">,
        </span><span style="color: teal">@LevelCount </span><span style="color: blue">as int </span><span style="color: gray">= </span><font style="background-color: #ffff00">1</font><span style="color: gray">,
        </span><span style="color: teal">@StartLevel </span><span style="color: blue">as int </span><span style="color: gray">= </span><font style="background-color: #ffff00">1</font><span style="color: gray">,
        </span><span style="color: teal">@ObjectListDate </span><span style="color: blue">as datetime </span><span style="color: gray">= </span><span style="color: magenta">getutcdate</span><span style="color: gray">(),
        </span><span style="color: teal">@ObjectList </span><span style="color: blue">as xml

SET </span><span style="color: teal">@ObjectList </span><span style="color: gray">= </span><span style="color: red">'&lt;Data&gt;&lt;Objects&gt;&lt;Object Use=&quot;Containment&quot;&gt;' </span><span style="color: gray">+ 
    </span><span style="color: magenta">convert</span><span style="color: gray">(</span><span style="color: blue">varchar</span><span style="color: gray">,(
        </span><span style="color: blue">SELECT </span><span style="color: teal">ManagedEntityRowId 
        </span><span style="color: blue">FROM </span><span style="color: teal">vManagedEntity 
        </span><span style="color: blue">WHERE </span><span style="color: teal">displayName </span><span style="color: gray">= </span><span style="color: teal">@GroupDisplayName</span><span style="color: gray">)) + 
        </span><span style="color: red">'&lt;/Object&gt;&lt;/Objects&gt;&lt;/Data&gt;'

</span><span style="color: blue">CREATE TABLE </span><span style="color: teal">#ObjectList </span><span style="color: gray">(</span><span style="color: teal">ManagedEntityRowId </span><span style="color: blue">int</span><span style="color: gray">)
</span><span style="color: blue">INSERT INTO </span><span style="color: teal">#ObjectList </span><span style="color: gray">(</span><span style="color: teal">ManagedEntityRowId</span><span style="color: gray">)
</span><span style="color: blue">EXEC </span><span style="color: teal">[Microsoft_SystemCenter_DataWarehouse_Report_Library_ReportObjectListParse]
    @ObjectList </span><span style="color: gray">= </span><span style="color: teal">@ObjectList</span><span style="color: gray">,
    </span><span style="color: teal">@StartDate </span><span style="color: gray">= </span><span style="color: teal">@ObjectListDate</span><span style="color: gray">,
    </span><span style="color: teal">@EndDate </span><span style="color: gray">= </span><span style="color: teal">@ObjectListDate</span><span style="color: gray">,
    </span><span style="color: teal">@ContainmentLevelCount </span><span style="color: gray">= </span><span style="color: teal">@LevelCount</span><span style="color: gray">,
    </span><span style="color: teal">@ContainmentStartLevel </span><span style="color: gray">= </span><span style="color: teal">@StartLevel

</span><span style="color: blue">SELECT </span><span style="color: magenta">ISNULL</span><span style="color: gray">(</span><span style="color: teal">vme</span><span style="color: gray">.</span><span style="color: blue">Path</span><span style="color: gray">,</span><span style="color: teal">vme</span><span style="color: gray">.</span><span style="color: teal">DisplayName</span><span style="color: gray">) </span><span style="color: blue">AS </span><span style="color: teal">DisplayName</span><span style="color: gray">, </span><span style="color: teal">ManagedEntityDefaultName
</span><span style="color: blue">FROM </span><span style="color: teal">vManagedEntity </span><span style="color: blue">as </span><span style="color: teal">vme </span><span style="color: gray">inner join
    </span><span style="color: teal">#ObjectList </span><span style="color: blue">on </span><span style="color: teal">#ObjectList</span><span style="color: gray">.</span><span style="color: teal">ManagedEntityRowId </span><span style="color: gray">= </span><span style="color: teal">vme</span><span style="color: gray">.</span><span style="color: teal">ManagedEntityRowId

</span><span style="color: blue">DROP TABLE </span><span style="color: teal">#ObjectList

</span></pre>
<p><span style="color: teal"></p>
<p>&#160;</p>
<p></span></p>
<p>If you wanted to return a history of group membership, you could replace StartDate and EndDate parameters with your desired range.</p>
<p>&#160;</p>
<p>Looking for a custom dashboard solution for Operations Manager? <a href="http://scomskills.com/contact">Give us a ring!</a></p>
<p><a href="http://scomskills.com"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SCOMskills_Signature5" border="0" alt="SCOMskills_Signature5" src="http://scomskills.com/blog/wp-content/uploads/2013/04/SCOMskills_Signature5.png" width="220" height="39" /></a></p>
<p>&#160;</p>
<p>_</p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=412</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Event Description Pattern Matching (with minimal impact)</title>
		<link>http://scomskills.com/blog/?p=390</link>
		<comments>http://scomskills.com/blog/?p=390#comments</comments>
		<pubDate>Sat, 23 Mar 2013 19:57:51 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[Authoring]]></category>
		<category><![CDATA[VSAE Fragment]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=390</guid>
		<description><![CDATA[One thing to think about when authoring rules and monitors is performance, and Windows event monitoring is no exception. If you need to search for a string in an event description, and if said event description is not parameterized, this post is for you. You could add this logic while creating a rule in the [...]]]></description>
			<content:encoded><![CDATA[<p>One thing to think about when authoring rules and monitors is performance, and Windows event monitoring is no exception. If you need to search for a string in an event description, and if said event description is not parameterized, this post is for you.</p>
<p>You <strong>could </strong>add this logic while creating a rule in the Operations console.</p>
<p>&#160;</p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/image8.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://scomskills.com/blog/wp-content/uploads/2013/03/image_thumb8.png" width="554" height="254" /></a></p>
<p>&#160;</p>
<p>The reason you <strong>should not</strong> do this is because it&#8217;s going to require more compute time than is necessary. If the monitored event log typically has a steady stream of events written, a single event detection rule like this could create a significant processing bottleneck on the monitored computer.</p>
<p>This is because all filtering is happening at the data source level, which means every element in your expression filter is checked against every event that is written to the specified log on that computer. Searching for a string in the event description takes time, and this is why it&#8217;s a bad practice to implement event description processing in the data source module.</p>
<p>To implement event monitoring with minimal performance impact, I suggest <strong>including only</strong>&#160;<strong>these parameters</strong> in the data source criteria:</p>
<ul>
<li><strong>Event Source </strong></li>
<li><strong>Event Id </strong></li>
<li><strong>Event Level </strong></li>
<li><strong>Event Category </strong></li>
<li><strong>Event Parameter [0-..]</strong> </li>
</ul>
<p>&#160;</p>
<p>Furthermore, I suggest <strong>including only</strong>&#160;<strong>these operators</strong> in the data source criteria:</p>
<ul>
<li><strong>Equal </strong></li>
<li><strong>NotEqual </strong></li>
<li><strong>Greater </strong></li>
<li><strong>GreaterEqual </strong></li>
<li><strong>Less </strong></li>
<li><strong>LessEqual</strong> </li>
</ul>
<p>&#160;</p>
<p><strong>So, how is it possible to implement pattern matching while still providing minimal processing impact?</strong></p>
<p><strong>The answer is to process pattern matching criteria in a condition detection module.</strong></p>
<p>&#160;</p>
<p>Wow, what a concept! Let the data source filter the simple event criteria, then move to the next module to process more complex criteria. That&#8217;s the cool thing about using System.ExpressionFilter. The workflow will exit if the expression &lt;&gt; true.</p>
<p>&#160;</p>
<p>To understand this logic a little better, here is the processing sequence&#8230;</p>
<p><strong>Without Condition Detection:</strong></p>
<p>1. DataSource\EventDetection\Provider &#8211; match event log and logging computer (if true, move next) </p>
<p>2. DataSource\EventDetection\Filter &#8211; <strong><font color="#000000">process all criteria</font></strong> (if true, move next) </p>
<p>3. WriteAction\Alert &#8211; generate an alert </p>
<p>&#160;</p>
<p><strong>With Condition Detection:</strong></p>
<p>1. DataSource\EventDetection\Provider &#8211; match event log and logging computer (if true, move next) </p>
<p>2. DataSource\BasicEventDetection\Filter &#8211; <strong><font color="#000000">process simple criteria</font></strong> (if true, move next) </p>
<p>3. ConditionDetection\FilterDescription &#8211; <strong><font color="#000000">process complex criteria</font></strong> (if true, move next)</p>
<p>4. WriteAction\Alert &#8211; generate an alert</p>
<p>&#160;</p>
<p>Unfortunately, it is not possible to implement the condition detection module in the Operations console. You will need to author this using the R2 Authoring Console, Visual Studio Authoring Extension, or directly in XML. I am providing a rule fragment you can add to your project using VSAE.</p>
<p>Similarly, you could implement this logic in an event detection monitor.</p>
<p>&#160;</p>
<p>The below fragment detects event <strong>101</strong>, with source <strong>TEST</strong> and event level <strong>ERROR</strong> in the <strong>Application</strong> log. If simple criteria matches, move the next module to process complex criteria (match <strong>SomePattern </strong>in the event description). Generate an alert at the end.</p>
<p>This rule fragment needs to be updated with your criteria and alert details. If you build it, alerts will come &#8211; and your manager will thank you.</p>
<p>&#160;</p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">ManagementPackFragment </span><span style="color: red">SchemaVersion</span><span style="color: blue">=</span>&quot;<span style="color: blue">2.0</span>&quot; <span style="color: red">xmlns:xsd</span><span style="color: blue">=</span>&quot;<span style="color: blue">http://www.w3.org/2001/XMLSchema</span>&quot;<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Rules</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">Rule </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">MyMp.Rule.EventDescriptionMatches</span>&quot; <span style="color: red">ConfirmDelivery</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: red">DiscardLevel</span><span style="color: blue">=</span>&quot;<span style="color: blue">100</span>&quot; <span style="color: red">Enabled</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: red">Priority</span><span style="color: blue">=</span>&quot;<span style="color: blue">Normal</span>&quot; <span style="color: red">Remotable</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Target</span><span style="color: blue">=</span>&quot;<span style="color: blue">Windows!Microsoft.Windows.Computer</span>&quot;<span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;</span>Alert<span style="color: blue">&lt;/</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DataSources</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">DataSource </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">BasicEventDetection</span>&quot; <span style="color: red">TypeID</span><span style="color: blue">=</span>&quot;<span style="color: blue">Windows!Microsoft.Windows.EventProvider</span>&quot;<span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">ComputerName</span><span style="color: blue">&gt;</span>$Target/Property[Type=&quot;Windows!Microsoft.Windows.Computer&quot;]/NetworkName$<span style="color: blue">&lt;/</span><span style="color: #a31515">ComputerName</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">LogName</span><span style="color: blue">&gt;</span>Application<span style="color: blue">&lt;/</span><span style="color: #a31515">LogName</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">And</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                      &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventSourceName<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
                    &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>Equal<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                      &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>TEST<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;
                    &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                      &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventDisplayNumber<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
                    &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>Equal<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                      &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>101<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;
                    &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                      &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventLevel<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
                    &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>Equal<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                      &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>1<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;
                    &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">And</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">DataSource</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DataSources</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">ConditionDetection </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">FilterDescription</span>&quot; <span style="color: red">TypeID</span><span style="color: blue">=</span>&quot;<span style="color: blue">System!System.ExpressionFilter</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">RegExExpression</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventDescription<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>MatchesRegularExpression<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Pattern</span><span style="color: blue">&gt;</span>SomePattern<span style="color: blue">&lt;/</span><span style="color: #a31515">Pattern</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">RegExExpression</span><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">ConditionDetection</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">WriteActions</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">WriteAction </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">Alert</span>&quot; <span style="color: red">TypeID</span><span style="color: blue">=</span>&quot;<span style="color: blue">Health!System.Health.GenerateAlert</span>&quot;<span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Priority</span><span style="color: blue">&gt;</span>1<span style="color: blue">&lt;/</span><span style="color: #a31515">Priority</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Severity</span><span style="color: blue">&gt;</span>2<span style="color: blue">&lt;/</span><span style="color: #a31515">Severity</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">AlertMessageId</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;MyMp.Rule.EventDescriptionMatches.AlertMessage&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">AlertMessageId</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">AlertParameters </span><span style="color: blue">/&gt;
            &lt;</span><span style="color: #a31515">Suppression </span><span style="color: blue">/&gt;
          &lt;/</span><span style="color: #a31515">WriteAction</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">WriteActions</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">Rule</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Rules</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Presentation</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">StringResources</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">StringResource </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">MyMp.Rule.EventDescriptionMatches.AlertMessage</span>&quot;<span style="color: blue">/&gt;
    &lt;/</span><span style="color: #a31515">StringResources</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Presentation</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">LanguagePack </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">ENU</span>&quot; <span style="color: red">IsDefault</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot;<span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>&quot;<span style="color: blue">MyMp.Rule.EventDescriptionMatches</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Event Description Match Alert Rule<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>&quot;<span style="color: blue">MyMp.Rule.EventDescriptionMatches.AlertMessage</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Event Description Match<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;</span>Event description match pattern specified in rule configuration.<span style="color: blue">&lt;/</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">LanguagePack</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">ManagementPackFragment</span><span style="color: blue">&gt;

</span></pre>
<p>&#160;</p>
<p>&#160;</p>
<p>Do you need help developing a management pack? <a href="http://scomskills.com/contact">Give us a ring!</a></p>
<p><a href="http://scomskills.com"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SCOMskills_Signature" border="0" alt="SCOMskills_Signature" src="http://scomskills.com/blog/wp-content/uploads/2013/03/SCOMskills_Signature1.png" width="220" height="39" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>__</p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=390</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Computer and Instance Group Fragments in VSAE</title>
		<link>http://scomskills.com/blog/?p=383</link>
		<comments>http://scomskills.com/blog/?p=383#comments</comments>
		<pubDate>Sat, 23 Mar 2013 02:04:12 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[Authoring]]></category>
		<category><![CDATA[VSAE Fragment]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=383</guid>
		<description><![CDATA[I&#8217;m updating my Technet posts about creating groups in the R2 Authoring Console. Here are the same examples using the Visual Studio Authoring Extensions. You can add these as templates to your fragment library for use in future development projects. &#160; How to create a computer group using VSAE &#160; Original post: How to create [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m updating my <a href="http://blogs.technet.com/b/jonathanalmquist/archive/tags/authoring/" target="_blank">Technet posts</a> about creating groups in the R2 Authoring Console. Here are the same examples using the Visual Studio Authoring Extensions. You can add these as templates to your fragment library for use in future development projects.</p>
<p>&#160;</p>
<h1><strong><font color="#f79646" size="2">How to create a computer group using VSAE</font></strong></h1>
<p>&#160;</p>
<p>Original post: <a href="http://blogs.technet.com/b/jonathanalmquist/archive/2010/04/28/how-to-create-a-computer-group-in-the-r2-authoring-console.aspx">How to create a computer group in the R2 Authoring Console</a></p>
<p>&#160;</p>
<p>The main thing to focus on here is <font style="background-color: #ffff00" color="#000000">$MPElement[Name=&quot;YourMp.Class.YourClass&quot;]$</font>. This is referencing the class in which you want to include it&#8217;s hosting Windows Computer object.</p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">ManagementPackFragment </span><span style="color: red">SchemaVersion</span><span style="color: blue">=</span>&quot;<span style="color: blue">2.0</span>&quot; <span style="color: red">xmlns:xsd</span><span style="color: blue">=</span>&quot;<span style="color: blue">http://www.w3.org/2001/XMLSchema</span>&quot;<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">EntityTypes</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">ClassTypes</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">ClassType </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Class.YourComputerGroup</span>&quot; <span style="color: red">Abstract</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Accessibility</span><span style="color: blue">=</span>&quot;<span style="color: blue">Public</span>&quot; <span style="color: red">Base</span><span style="color: blue">=</span>&quot;<span style="color: blue">SC!Microsoft.SystemCenter.ComputerGroup</span>&quot; <span style="color: red">Hosted</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Singleton</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: blue">/&gt;
      &lt;/</span><span style="color: #a31515">ClassTypes</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">EntityTypes</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Discoveries</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">Discovery </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Discovery.YourComputerGroup</span>&quot; <span style="color: red">ConfirmDelivery</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Enabled</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: red">Priority</span><span style="color: blue">=</span>&quot;<span style="color: blue">Normal</span>&quot; <span style="color: red">Remotable</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: red">Target</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Class.YourComputerGroup</span>&quot;<span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;</span>Discovery<span style="color: blue">&lt;/</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DiscoveryTypes </span><span style="color: blue">/&gt;
        &lt;</span><span style="color: #a31515">DataSource </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">DS1</span>&quot; <span style="color: red">TypeID</span><span style="color: blue">=</span>&quot;<span style="color: blue">SC!Microsoft.SystemCenter.GroupPopulator</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">RuleId</span><span style="color: blue">&gt;</span>$MPElement$<span style="color: blue">&lt;/</span><span style="color: #a31515">RuleId</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">GroupInstanceId</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;YourMp.Class.YourComputerGroup&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">GroupInstanceId</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">MembershipRules</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">MembershipRule</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;Windows!Microsoft.Windows.Computer&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">RelationshipClass</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;SC!Microsoft.SystemCenter.ComputerGroupContainsComputer&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">RelationshipClass</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">Contains</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;</span><font style="background-color: #ffff00">$MPElement[Name=&quot;YourMp.Class.YourClass&quot;]$</font><span style="color: blue">&lt;/</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">Contains</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">MembershipRule</span><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">MembershipRules</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DataSource</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">Discovery</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Discoveries</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">LanguagePack </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">ENU</span>&quot; <span style="color: red">IsDefault</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot;<span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Class.YourComputerGroup</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Your Computer Group<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;</span>This group contains instances of Windows Computer objects that host YourClass.<span style="color: blue">&lt;/</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Discovery.YourComputerGroup</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Your Group Discovery<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">LanguagePack</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">ManagementPackFragment</span><span style="color: blue">&gt;

</span></pre>
<p>&#160;</p>
<h1><strong><font color="#f79646" size="2">How to create an instance group using VSAE</font></strong></h1>
<p>&#160;</p>
<p>Original post: <a href="http://blogs.technet.com/b/jonathanalmquist/archive/2010/05/08/how-to-create-an-instance-group-in-the-r2-authoring-console.aspx">How to create an instance group in the R2 Authoring Console</a></p>
<p>&#160;</p>
<p>The main thing to focus on here is <font style="background-color: #ffff00" color="#000000">$MPElement[Name=&quot;YourMp.Class.YourFirstClass&quot;]$</font>. This is referencing the discovered instances in which you want to include in your group. You can add multiple classes if you need the group to contain different types of instances.</p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">ManagementPackFragment </span><span style="color: red">SchemaVersion</span><span style="color: blue">=</span>&quot;<span style="color: blue">2.0</span>&quot; <span style="color: red">xmlns:xsd</span><span style="color: blue">=</span>&quot;<span style="color: blue">http://www.w3.org/2001/XMLSchema</span>&quot;<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">EntityTypes</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">ClassTypes</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">ClassType </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Class.YourInstanceGroup</span>&quot; <span style="color: red">Abstract</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Accessibility</span><span style="color: blue">=</span>&quot;<span style="color: blue">Public</span>&quot; <span style="color: red">Base</span><span style="color: blue">=</span>&quot;<span style="color: blue">MSIL!Microsoft.SystemCenter.InstanceGroup</span>&quot; <span style="color: red">Hosted</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Singleton</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: blue">/&gt;
      &lt;/</span><span style="color: #a31515">ClassTypes</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">EntityTypes</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Discoveries</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">Discovery </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Discovery.YourInstanceGroup</span>&quot; <span style="color: red">ConfirmDelivery</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Enabled</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: red">Priority</span><span style="color: blue">=</span>&quot;<span style="color: blue">Normal</span>&quot; <span style="color: red">Remotable</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: red">Target</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Class.YourInstanceGroup</span>&quot;<span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;</span>Discovery<span style="color: blue">&lt;/</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DiscoveryTypes</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">DiscoveryClass </span><span style="color: red">TypeID</span><span style="color: blue">=</span>&quot;<span style="color: blue"><font style="background-color: #ffff00">YourMp.Class.YourFirstClass</font></span>&quot; <span style="color: blue">/&gt;
          &lt;</span><span style="color: #a31515">DiscoveryClass </span><span style="color: red">TypeID</span><span style="color: blue">=</span>&quot;<span style="color: blue"><font style="background-color: #ffff00">YourMp.Class.YourSecondClass</font></span>&quot; <span style="color: blue">/&gt;
        &lt;/</span><span style="color: #a31515">DiscoveryTypes</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DataSource </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">DS1</span>&quot; <span style="color: red">TypeID</span><span style="color: blue">=</span>&quot;<span style="color: blue">SC!Microsoft.SystemCenter.GroupPopulator</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">RuleId</span><span style="color: blue">&gt;</span>$MPElement$<span style="color: blue">&lt;/</span><span style="color: #a31515">RuleId</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">GroupInstanceId</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;YourMp.Class.YourInstanceGroup&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">GroupInstanceId</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">MembershipRules</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">MembershipRule</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;</span><font style="background-color: #ffff00">$MPElement[Name=&quot;YourMp.Class.YourFirstClass&quot;]</font>$<span style="color: blue">&lt;/</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">RelationshipClass</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">RelationshipClass</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">MembershipRule</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">MembershipRule</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;</span><font style="background-color: #ffff00">$MPElement[Name=&quot;YourMp.Class.YourSecondClass&quot;]$</font><span style="color: blue">&lt;/</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">RelationshipClass</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;MSIL!Microsoft.SystemCenter.InstanceGroupContainsEntities&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">RelationshipClass</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">MembershipRule</span><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">MembershipRules</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DataSource</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">Discovery</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Discoveries</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">LanguagePack </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">ENU</span>&quot; <span style="color: red">IsDefault</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot;<span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Class.YourInstanceGroup</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Your Instances Group<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;</span>This group contains all discovered instances referenced in the MonitoringClass(es).<span style="color: blue">&lt;/</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Discovery.YourInstanceGroup</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Your Instance Group Discovery<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">LanguagePack</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">ManagementPackFragment</span><span style="color: blue">&gt;

</span></pre>
<p>&#160;</p>
<p><font color="#f79646" size="2"><strong>How to create a group of Windows Computer instances that host some class and matches a property of that class.</strong></font></p>
<p>&#160;</p>
<p>Original post: <a href="http://blogs.technet.com/b/jonathanalmquist/archive/2010/07/22/how-to-create-a-group-of-windows-computers-based-on-a-discovered-property-of-virtually-any-class.aspx">How to create a group of Windows Computers based on a discovered property of virtually any class</a></p>
<p>&#160;</p>
<p>The main thing to focus on here is <font style="background-color: #ffff00" color="#000000">$MPElement[Name=&quot;YourMp.Class.SomeClass&quot;]$</font>. This is referencing the Windows Computer hosted instances in which you want to include in your group. Also notice <font style="background-color: #ffff00" color="#000000">SomeProperty</font> and <font style="background-color: #ffff00" color="#000000">SomePattern</font> &#8211; this is the property you will be comparing in your regular expression.</p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">ManagementPackFragment </span><span style="color: red">SchemaVersion</span><span style="color: blue">=</span>&quot;<span style="color: blue">2.0</span>&quot; <span style="color: red">xmlns:xsd</span><span style="color: blue">=</span>&quot;<span style="color: blue">http://www.w3.org/2001/XMLSchema</span>&quot;<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">EntityTypes</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">ClassTypes</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">ClassType </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Class.YourComputerGroup</span>&quot; <span style="color: red">Abstract</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Accessibility</span><span style="color: blue">=</span>&quot;<span style="color: blue">Public</span>&quot; <span style="color: red">Base</span><span style="color: blue">=</span>&quot;<span style="color: blue">SC!Microsoft.SystemCenter.ComputerGroup</span>&quot; <span style="color: red">Hosted</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Singleton</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: blue">/&gt;
      &lt;/</span><span style="color: #a31515">ClassTypes</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">EntityTypes</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Discoveries</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">Discovery </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Discovery.YourComputerGroup</span>&quot; <span style="color: red">ConfirmDelivery</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot; <span style="color: red">Enabled</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: red">Priority</span><span style="color: blue">=</span>&quot;<span style="color: blue">Normal</span>&quot; <span style="color: red">Remotable</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot; <span style="color: red">Target</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Class.YourComputerGroup</span>&quot;<span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;</span>Discovery<span style="color: blue">&lt;/</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DiscoveryTypes </span><span style="color: blue">/&gt;
        &lt;</span><span style="color: #a31515">DataSource </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">DS1</span>&quot; <span style="color: red">TypeID</span><span style="color: blue">=</span>&quot;<span style="color: blue">SC!Microsoft.SystemCenter.GroupPopulator</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">RuleId</span><span style="color: blue">&gt;</span>$MPElement$<span style="color: blue">&lt;/</span><span style="color: #a31515">RuleId</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">GroupInstanceId</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;YourMp.Class.YourComputerGroup&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">GroupInstanceId</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">MembershipRules</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">MembershipRule</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;Windows!Microsoft.Windows.Computer&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">RelationshipClass</span><span style="color: blue">&gt;</span>$MPElement[Name=&quot;SC!Microsoft.SystemCenter.ComputerGroupContainsComputer&quot;]$<span style="color: blue">&lt;/</span><span style="color: #a31515">RelationshipClass</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">Contains</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;</span><font style="background-color: #ffff00">$MPElement[Name=&quot;SomeMp.Class.SomeClass&quot;]$</font><span style="color: blue">&lt;/</span><span style="color: #a31515">MonitoringClass</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">RegExExpression</span><span style="color: blue">&gt;
                      &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                        &lt;</span><span style="color: #a31515">Property</span><span style="color: blue">&gt;</span><font style="background-color: #ffff00">$MPElement[Name=&quot;SomeMp.Class.SomeClass&quot;]/SomeProperty$</font><span style="color: blue">&lt;/</span><span style="color: #a31515">Property</span><span style="color: blue">&gt;
                      &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                      &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>MatchesRegularExpression<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                      &lt;</span><span style="color: #a31515">Pattern</span><span style="color: blue">&gt;</span><font style="background-color: #ffff00">SomePattern</font><span style="color: blue">&lt;/</span><span style="color: #a31515">Pattern</span><span style="color: blue">&gt;
                    &lt;/</span><span style="color: #a31515">RegExExpression</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">Contains</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">MembershipRule</span><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">MembershipRules</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DataSource</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">Discovery</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Discoveries</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">LanguagePack </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">ENU</span>&quot; <span style="color: red">IsDefault</span><span style="color: blue">=</span>&quot;<span style="color: blue">true</span>&quot;<span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Class.YourComputerGroup</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Your Computer Group<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;</span>This group contains Windows Computer instances that host some class and matches some property of that class.<span style="color: blue">&lt;/</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>&quot;<span style="color: blue">YourMp.Discovery.YourComputerGroup</span>&quot;<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Your Group Discovery<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">LanguagePack</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">ManagementPackFragment</span><span style="color: blue">&gt;

</span></pre>
<p>&#160;</p>
<p>Check out this <a href="http://scomskills.com/blog/?p=283">other post</a> about adding Health Service objects to a group.</p>
<p>&#160;</p>
<p>Need help developing a management pack? <a href="http://scomskills.com/contact">Drop us a line</a></p>
<p><a href="http://scomskills.com"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SCOMskills_Signature" border="0" alt="SCOMskills_Signature" src="http://scomskills.com/blog/wp-content/uploads/2013/03/SCOMskills_Signature.png" width="220" height="39" /></a>.</p>
<p>&#160;</p>
<p>&#160;</p>
<p>_</p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=383</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dependency Monitor</title>
		<link>http://scomskills.com/blog/?p=376</link>
		<comments>http://scomskills.com/blog/?p=376#comments</comments>
		<pubDate>Thu, 14 Mar 2013 05:52:46 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[Authoring]]></category>
		<category><![CDATA[VSAE Fragment]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=376</guid>
		<description><![CDATA[If you&#8217;ve been following the series, you should have two classes and a unit monitor. As discussed earlier in the series, the base class types used are Local Application and Application Component, and these do not automatically rollup health to its hosting class. If you want unit monitors targeting the application component class to rollup [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been following <a href="http://scomskills.com/blog/?cat=10">the series</a>, you should have two classes and a unit monitor. As discussed earlier in the series, the base class types used are Local Application and Application Component, and these do not automatically rollup health to its hosting class.</p>
<p>If you want unit monitors targeting the application component class to rollup health to its hosting class (local application), you can add a dependency monitor</p>
<p>I prefer to add dependency monitors to the fragment that contains the class in which I want to rollup. So, this fragment is a <a href="http://scomskills.com/blog/?p=299">repeat of the application component class fragment posted earlier</a>, which the exception of including the dependency monitor (highlighted).</p>
<p>&nbsp;</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">ManagementPackFragment </span><span style="color: red">SchemaVersion</span><span style="color: blue">=</span>"<span style="color: blue">2.0</span>" <span style="color: red">xmlns:xsd</span><span style="color: blue">=</span>"<span style="color: blue">http://www.w3.org/2001/XMLSchema</span>"<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">EntityTypes</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">ClassTypes</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">ClassType </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.ApplicationComponent.Class</span>" <span style="color: red">Abstract</span><span style="color: blue">=</span>"<span style="color: blue">false</span>" <span style="color: red">Accessibility</span><span style="color: blue">=</span>"<span style="color: blue">Public</span>" <span style="color: red">Base</span><span style="color: blue">=</span>"<span style="color: blue">Windows!Microsoft.Windows.ApplicationComponent</span>" <span style="color: red">Hosted</span><span style="color: blue">=</span>"<span style="color: blue">true</span>" <span style="color: red">Singleton</span><span style="color: blue">=</span>"<span style="color: blue">false</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Property </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">CsvField1</span>" <span style="color: red">Key</span><span style="color: blue">=</span>"<span style="color: blue">false</span>" <span style="color: red">Type</span><span style="color: blue">=</span>"<span style="color: blue">string</span>"<span style="color: blue">/&gt;
          &lt;</span><span style="color: #a31515">Property </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">CsvField2</span>" <span style="color: red">Key</span><span style="color: blue">=</span>"<span style="color: blue">false</span>" <span style="color: red">Type</span><span style="color: blue">=</span>"<span style="color: blue">string</span>"<span style="color: blue">/&gt;
        &lt;/</span><span style="color: #a31515">ClassType</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">ClassTypes</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">RelationshipTypes</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">RelationshipType </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">LocalApplicationHostsApplicationComponent</span>" <span style="color: red">Base</span><span style="color: blue">=</span>"<span style="color: blue">System!System.Hosting</span>" <span style="color: red">Accessibility</span><span style="color: blue">=</span>"<span style="color: blue">Public</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Source </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">LocalApplication</span>" <span style="color: red">Type</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.LocalApplication.Class</span>"<span style="color: blue">/&gt;
          &lt;</span><span style="color: #a31515">Target </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">ApplicationComponent</span>" <span style="color: red">Type</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.ApplicationComponent.Class</span>"<span style="color: blue">/&gt;
        &lt;/</span><span style="color: #a31515">RelationshipType</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">RelationshipTypes</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">EntityTypes</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
<font style="background-color: #ffff00">  &lt;</font></span><span style="color: #a31515"><font style="background-color: #ffff00">Monitoring</font></span><font style="background-color: #ffff00"><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Monitors</span></font><font style="background-color: #ffff00"><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DependencyMonitor </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">ApplicationComponentAvailabilityRollup</span>" <span style="color: red">Accessibility</span><span style="color: blue">=</span>"<span style="color: blue">Internal</span>" <span style="color: red">Enabled</span><span style="color: blue">=</span>"<span style="color: blue">true</span>" <span style="color: red">MemberMonitor</span><span style="color: blue">=</span>"<span style="color: blue">Health!System.Health.AvailabilityState</span>" <span style="color: red">ParentMonitorID</span><span style="color: blue">=</span>"<span style="color: blue">Health!System.Health.AvailabilityState</span>" <span style="color: red">RelationshipType</span><span style="color: blue">=</span>"<span style="color: blue">LocalApplicationHostsApplicationComponent</span>" <span style="color: red">Priority</span><span style="color: blue">=</span>"<span style="color: blue">Normal</span>" <span style="color: red">Remotable</span><span style="color: blue">=</span>"<span style="color: blue">false</span>" <span style="color: red">Target</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.LocalApplication.Class</span>"</font><font style="background-color: #ffff00"><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;</span>AvailabilityHealth<span style="color: blue">&lt;/</span><span style="color: #a31515">Category</span></font><font style="background-color: #ffff00"><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Algorithm</span><span style="color: blue">&gt;</span>WorstOf<span style="color: blue">&lt;/</span><span style="color: #a31515">Algorithm</span></font><font style="background-color: #ffff00"><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">DependencyMonitor</span></font><font style="background-color: #ffff00"><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Monitors</span></font><font style="background-color: #ffff00"><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Monitoring</span></font><span style="color: blue"><font style="background-color: #ffff00">&gt;</font>
  &lt;</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">LanguagePack </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">ENU</span>" <span style="color: red">IsDefault</span><span style="color: blue">=</span>"<span style="color: blue">true</span>"<span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.ApplicationComponent.Class</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>SCOMskills Application Component Class<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.ApplicationComponent.Class</span>" <span style="color: red">SubElementID</span><span style="color: blue">=</span>"<span style="color: blue">CsvField1</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>CSV Field 1<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.ApplicationComponent.Class</span>" <span style="color: red">SubElementID</span><span style="color: blue">=</span>"<span style="color: blue">CsvField2</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>CSV Field 2<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">LocalApplicationHostsApplicationComponent</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Local Application class hosts Application Component class<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
<font style="background-color: #ffff00">        &lt;</font></span><font style="background-color: #ffff00"><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">ApplicationComponentAvailabilityRollup</span>"</font><font style="background-color: #ffff00"><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Application Component Health<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span></font><font style="background-color: #ffff00"><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span></font><span style="color: blue"><font style="background-color: #ffff00">&gt;</font>
      &lt;/</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">LanguagePack</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">ManagementPackFragment</span><span style="color: blue">&gt;
</span></pre>
<pre class="code"><span style="color: blue"></span>&nbsp;</pre>
<pre class="code"><span style="color: blue"></span>&nbsp;</pre>
<pre class="code"><span style="color: blue"></span>&nbsp;</pre>
<pre class="code"><span style="color: blue"><a href="http://scomskills.com"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Logo_Main_LinkedIn" border="0" alt="Logo_Main_LinkedIn" src="http://scomskills.com/blog/wp-content/uploads/2013/03/Logo_Main_LinkedIn2.png" width="100" height="62"></a></pre>
</p>
<p><font face="Courier New">_</font></span></p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=376</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two-State Event Detection</title>
		<link>http://scomskills.com/blog/?p=372</link>
		<comments>http://scomskills.com/blog/?p=372#comments</comments>
		<pubDate>Thu, 14 Mar 2013 05:37:14 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[Authoring]]></category>
		<category><![CDATA[VSAE Fragment]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=372</guid>
		<description><![CDATA[This fragment demonstrates how you can use one of the built-in, two-state Windows event modules to compose a unit monitor. This fragment is the next example in the VSAE Fragment category; the xml fragment below should work as described if you have been following the series. Module Type used in this post: Microsoft.Windows.2SingleEventLog2StateMonitorType Scenario Change [...]]]></description>
			<content:encoded><![CDATA[<p>This fragment demonstrates how you can use one of the built-in, two-state Windows event modules to compose a unit monitor. This fragment is the next example in the VSAE Fragment category; the xml fragment below should work as described if you have been following the <a href="http://scomskills.com/blog/?cat=10">series</a>.</p>
<p>Module Type used in this post: Microsoft.Windows.2SingleEventLog2StateMonitorType</p>
<p><strong><font color="#000000">Scenario</font></strong></p>
<p>Change state to critical and raise a critical alert when event Id 101, from&nbsp; source TEST, and event level is Error is detected in the Application log. Resolve alert when same event is detected with event level Information.</p>
<p>A note about event level:</p>
<p>1 = Warning</p>
<p>2 = Error</p>
<p>4 = Information</p>
<p>&nbsp;</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">ManagementPackFragment </span><span style="color: red">SchemaVersion</span><span style="color: blue">=</span>"<span style="color: blue">2.0</span>" <span style="color: red">xmlns:xsd</span><span style="color: blue">=</span>"<span style="color: blue">http://www.w3.org/2001/XMLSchema</span>"<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Monitors</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">UnitMonitor </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.Event101.2State</span>" <span style="color: red">Accessibility</span><span style="color: blue">=</span>"<span style="color: blue">Public</span>" <span style="color: red">ConfirmDelivery</span><span style="color: blue">=</span>"<span style="color: blue">false</span>" <span style="color: red">Enabled</span><span style="color: blue">=</span>"<span style="color: blue">true</span>" <span style="color: red">ParentMonitorID</span><span style="color: blue">=</span>"<span style="color: blue">Health!System.Health.AvailabilityState</span>" <span style="color: red">Priority</span><span style="color: blue">=</span>"<span style="color: blue">Normal</span>" <span style="color: red">Remotable</span><span style="color: blue">=</span>"<span style="color: blue">false</span>" <span style="color: red">Target</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.ApplicationComponent.Class</span>" <span style="color: red">TypeID</span><span style="color: blue">=</span>"<span style="color: blue">Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType</span>"<span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;</span>AvailabilityHealth<span style="color: blue">&lt;/</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">AlertSettings </span><span style="color: red">AlertMessage</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.Event101.2State.AlertMessage</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">AlertOnState</span><span style="color: blue">&gt;</span>Error<span style="color: blue">&lt;/</span><span style="color: #a31515">AlertOnState</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">AutoResolve</span><span style="color: blue">&gt;</span>true<span style="color: blue">&lt;/</span><span style="color: #a31515">AutoResolve</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">AlertPriority</span><span style="color: blue">&gt;</span>Normal<span style="color: blue">&lt;/</span><span style="color: #a31515">AlertPriority</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">AlertSeverity</span><span style="color: blue">&gt;</span>Error<span style="color: blue">&lt;/</span><span style="color: #a31515">AlertSeverity</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">AlertParameters</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">AlertParameter1</span><span style="color: blue">&gt;</span>$Data/Context/EventDescription$<span style="color: blue">&lt;/</span><span style="color: #a31515">AlertParameter1</span><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">AlertParameters</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">AlertSettings</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">OperationalStates</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">OperationalState </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">Unhealthy</span>" <span style="color: red">HealthState</span><span style="color: blue">=</span>"<span style="color: blue">Error</span>" <span style="color: red">MonitorTypeStateID</span><span style="color: blue">=</span>"<span style="color: blue">FirstEventRaised</span>"<span style="color: blue">/&gt;
          &lt;</span><span style="color: #a31515">OperationalState </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">Healthy</span>" <span style="color: red">HealthState</span><span style="color: blue">=</span>"<span style="color: blue">Success</span>" <span style="color: red">MonitorTypeStateID</span><span style="color: blue">=</span>"<span style="color: blue">SecondEventRaised</span>"<span style="color: blue">/&gt;
        &lt;/</span><span style="color: #a31515">OperationalStates</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Configuration</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">FirstComputerName</span><span style="color: blue">&gt;</span>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$<span style="color: blue">&lt;/</span><span style="color: #a31515">FirstComputerName</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">FirstLogName</span><span style="color: blue">&gt;</span>Application<span style="color: blue">&lt;/</span><span style="color: #a31515">FirstLogName</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">FirstExpression</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">And</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventSourceName<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>Equal<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>TEST<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventDisplayNumber<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>Equal<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>101<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventLevel<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>Equal<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>1<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">And</span><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">FirstExpression</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">SecondComputerName</span><span style="color: blue">&gt;</span>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$<span style="color: blue">&lt;/</span><span style="color: #a31515">SecondComputerName</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">SecondLogName</span><span style="color: blue">&gt;</span>Application<span style="color: blue">&lt;/</span><span style="color: #a31515">SecondLogName</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">SecondExpression</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">And</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventSourceName<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>Equal<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>TEST<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventDisplayNumber<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>Equal<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>101<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;</span>EventLevel<span style="color: blue">&lt;/</span><span style="color: #a31515">XPathQuery</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;</span>Equal<span style="color: blue">&lt;/</span><span style="color: #a31515">Operator</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;</span>4<span style="color: blue">&lt;/</span><span style="color: #a31515">Value</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">ValueExpression</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">SimpleExpression</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">Expression</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">And</span><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">SecondExpression</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">Configuration</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">UnitMonitor</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Monitors</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Presentation</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">StringResources</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">StringResource </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.Event101.2State.AlertMessage</span>"<span style="color: blue">/&gt;
    &lt;/</span><span style="color: #a31515">StringResources</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Presentation</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">LanguagePack </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">ENU</span>" <span style="color: red">IsDefault</span><span style="color: blue">=</span>"<span style="color: blue">true</span>"<span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.Event101.2State</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Event 101 Monitor<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;</span>Detect event Id 101. Raise alert if error, resolve alert if informational.<span style="color: blue">&lt;/</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.Event101.2State.AlertMessage</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Detected Event Id 101<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;</span>{0}<span style="color: blue">&lt;/</span><span style="color: #a31515">Description</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.Event101.2State</span>" <span style="color: red">SubElementID</span><span style="color: blue">=</span>"<span style="color: blue">Healthy</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Healthy<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.Event101.2State</span>" <span style="color: red">SubElementID</span><span style="color: blue">=</span>"<span style="color: blue">Unhealthy</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Unhealthy<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">LanguagePack</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">ManagementPackFragment</span><span style="color: blue">&gt;

</span></pre>
<pre class="code"><span style="color: blue"></span> </pre>
<pre class="code"><span style="color: blue"></span> </pre>
<pre class="code"><span style="color: blue"><a href="http://scomskills.com"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Logo_Main_LinkedIn[4]" border="0" alt="Logo_Main_LinkedIn[4]" src="http://scomskills.com/blog/wp-content/uploads/2013/03/Logo_Main_LinkedIn4.png" width="100" height="62"></a></pre>
<p><font face="Courier New">_</font></span></p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=372</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timed Script Discovery (vbscript part 2)</title>
		<link>http://scomskills.com/blog/?p=357</link>
		<comments>http://scomskills.com/blog/?p=357#comments</comments>
		<pubDate>Wed, 13 Mar 2013 05:32:35 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[Authoring]]></category>
		<category><![CDATA[VSAE Fragment]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=357</guid>
		<description><![CDATA[Referring back to the previous VSAE Fragment post regarding the Windows Timed Script Discovery Provider, you can see this module can be implemented directly in a new discovery. In most cases, this works very well. In some cases, you may want to create a custom discovery provider in order to expose configuration elements as separate [...]]]></description>
			<content:encoded><![CDATA[<p>Referring back to the <a href="http://scomskills.com/blog/?p=306">previous VSAE Fragment post regarding the Windows Timed Script Discovery Provider</a>, you can see this module can be implemented directly in a new discovery. In most cases, this works very well. In some cases, you may want to create a custom discovery provider in order to expose configuration elements as separate parameters &#8211; particularly override parameters.</p>
<p><strong><font color="#000000" size="2">Example of override parameters by implementing the built-in module type in your discovery</font></strong></p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/image6.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://scomskills.com/blog/wp-content/uploads/2013/03/image_thumb6.png" width="504" height="187"></a></p>
<p><strong><font color="#000000">Zooming in on the script arguments, you can see this:</font></strong></p>
<p><font style="background-color: #ffff00">$MPElement$ $Target/Id$ $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$ <font style="">c:\ScomSkillsDemo.csv</font></font></p>
<p><font style="background-color: #ffff00"></font><font style="">This isn&#8217;t very friendly to an operator that is setting a discovery override, and presents greater opportunity for override mistakes. The only parameter an operator might need to change is the CSV File Location.</font></p>
<p>So, how can this be improved from an operator perspective? One option is to create a new module type. If you have multiple parameters you want separated in the Operations console, this is probably the best option, as the built-in provider only allows for a single string of arguments.</p>
<p>This example is purely to offer a better experience for the operator creating overrides &#8211; there is really no difference in how instances will be discovered under the hood. The result will be new override parameters available in the Operations console.</p>
<p><strong><font color="#000000">Example of override parameters by implementing a custom discovery provider</font></strong></p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/image7.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://scomskills.com/blog/wp-content/uploads/2013/03/image_thumb7.png" width="504" height="219"></a></p>
<p>&nbsp;</p>
<p><strong><font color="#f79646" size="2">What does this do?</font></strong></p>
<p>This performs the same discovery as the <a href="http://scomskills.com/blog/?p=306">previous fragment</a>, but creates custom override parameters in the Operations console.</p>
<p>&nbsp;</p>
<p><strong><font color="#000000">Fragment 1: Custom discovery module type</font></strong></p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">ManagementPackFragment </span><span style="color: red">SchemaVersion</span><span style="color: blue">=</span>"<span style="color: blue">2.0</span>" <span style="color: red">xmlns:xsd</span><span style="color: blue">=</span>"<span style="color: blue">http://www.w3.org/2001/XMLSchema</span>"<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">ModuleTypes</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DataSourceModuleType </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.TimedScript.DiscoveryProvider.Custom</span>" <span style="color: red">Accessibility</span><span style="color: blue">=</span>"<span style="color: blue">Public</span>"<span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Configuration</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>"<span style="color: blue">1</span>" <span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Interval</span>" <span style="color: red">type</span><span style="color: blue">=</span>"<span style="color: blue">xsd:integer</span>" <span style="color: blue">/&gt;
          &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>"<span style="color: blue">1</span>" <span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">CsvFileLocation</span>" <span style="color: red">type</span><span style="color: blue">=</span>"<span style="color: blue">xsd:string</span>" <span style="color: blue">/&gt;
          &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>"<span style="color: blue">1</span>" <span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">PrincipalName</span>" <span style="color: red">type</span><span style="color: blue">=</span>"<span style="color: blue">xsd:string</span>" <span style="color: blue">/&gt;
          &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>"<span style="color: blue">1</span>" <span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">Timeout</span>" <span style="color: red">type</span><span style="color: blue">=</span>"<span style="color: blue">xsd:integer</span>" <span style="color: blue">/&gt;
        &lt;/</span><span style="color: #a31515">Configuration</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">OverrideableParameters</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">Interval</span>" <span style="color: red">ParameterType</span><span style="color: blue">=</span>"<span style="color: blue">int</span>" <span style="color: red">Selector</span><span style="color: blue">=</span>"<span style="color: blue">$Config/Interval$</span>"<span style="color: blue">/&gt;
          &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">CsvFileLocation</span>" <span style="color: red">ParameterType</span><span style="color: blue">=</span>"<span style="color: blue">string</span>" <span style="color: red">Selector</span><span style="color: blue">=</span>"<span style="color: blue">$Config/CsvFileLocation$</span>"<span style="color: blue">/&gt;
          &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">Timeout</span>" <span style="color: red">ParameterType</span><span style="color: blue">=</span>"<span style="color: blue">int</span>" <span style="color: red">Selector</span><span style="color: blue">=</span>"<span style="color: blue">$Config/Timeout$</span>"<span style="color: blue">/&gt;
        &lt;/</span><span style="color: #a31515">OverrideableParameters</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">ModuleImplementation </span><span style="color: red">Isolation</span><span style="color: blue">=</span>"<span style="color: blue">Any</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Composite</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">MemberModules</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">DataSource </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">Scheduler</span>" <span style="color: red">TypeID</span><span style="color: blue">=</span>"<span style="color: blue">System!System.Scheduler</span>"<span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">Scheduler</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">SimpleReccuringSchedule</span><span style="color: blue">&gt;
                    &lt;</span><span style="color: #a31515">Interval</span><span style="color: blue">&gt;</span>$Config/Interval$<span style="color: blue">&lt;/</span><span style="color: #a31515">Interval</span><span style="color: blue">&gt;
                  &lt;/</span><span style="color: #a31515">SimpleReccuringSchedule</span><span style="color: blue">&gt;
                  &lt;</span><span style="color: #a31515">ExcludeDates </span><span style="color: blue">/&gt;
                &lt;/</span><span style="color: #a31515">Scheduler</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">DataSource</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">ProbeAction </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">Script</span>" <span style="color: red">TypeID</span><span style="color: blue">=</span>"<span style="color: blue">Windows!Microsoft.Windows.ScriptDiscoveryProbe</span>"<span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">ScriptName</span><span style="color: blue">&gt;</span>SCOMskills.Demo.Discovery.vbs<span style="color: blue">&lt;/</span><span style="color: #a31515">ScriptName</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">Arguments</span><span style="color: blue">&gt;</span>$MPElement$ $Target/Id$ $Config/PrincipalName$ $Config/CsvFileLocation$<span style="color: blue">&lt;/</span><span style="color: #a31515">Arguments</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">ScriptBody</span><span style="color: blue">&gt;
                  &lt;![CDATA[
</span><span style="color: gray">Option Explicit

Dim oArgs
Set oArgs = WScript.Arguments
if oArgs.Count &lt; 4 Then
   Wscript.Quit -1
End If

Dim SourceID, ManagedEntityId, TargetComputer, SourceFile

SourceId = oArgs(0)
ManagedEntityId = oArgs(1)
TargetComputer = oArgs(2)
SourceFile = oArgs(3)

Dim oAPI, oDiscoveryData, oInst
Set oAPI = CreateObject("MOM.ScriptAPI")
set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityId)

Dim oFso, oFile, aField
Set oFso = CreateObject("Scripting.FileSystemObject")

If (oFso.FileExists(SourceFile)) Then
Set oFile = oFso.OpenTextFile(SourceFile)
aField = split(oFile.ReadLine,",")

set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='SCOMskills.Demo.ApplicationComponent.Class']$")
call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", TargetComputer)
call oInst.AddProperty("$MPElement[Name='SCOMskills.Demo.ApplicationComponent.Class']/CsvField1$", aField(0))
call oInst.AddProperty("$MPElement[Name='SCOMskills.Demo.ApplicationComponent.Class']/CsvField2$", aField(1))
call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", TargetComputer)
call oDiscoveryData.AddInstance(oInst)

Else

Wscript.Quit -1

End If

Call oAPI.Return(oDiscoveryData) 
                </span><span style="color: blue">]]&gt;
                &lt;/</span><span style="color: #a31515">ScriptBody</span><span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">TimeoutSeconds</span><span style="color: blue">&gt;</span>$Config/Timeout$<span style="color: blue">&lt;/</span><span style="color: #a31515">TimeoutSeconds</span><span style="color: blue">&gt;
              &lt;/</span><span style="color: #a31515">ProbeAction</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">MemberModules</span><span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Composition</span><span style="color: blue">&gt;
              &lt;</span><span style="color: #a31515">Node </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">Script</span>"<span style="color: blue">&gt;
                &lt;</span><span style="color: #a31515">Node </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">Scheduler</span>" <span style="color: blue">/&gt;
              &lt;/</span><span style="color: #a31515">Node</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">Composition</span><span style="color: blue">&gt;
          &lt;/</span><span style="color: #a31515">Composite</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">ModuleImplementation</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">OutputType</span><span style="color: blue">&gt;</span>System!System.Discovery.Data<span style="color: blue">&lt;/</span><span style="color: #a31515">OutputType</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">DataSourceModuleType</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">ModuleTypes</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">TypeDefinitions</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">LanguagePack </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">ENU</span>" <span style="color: red">IsDefault</span><span style="color: blue">=</span>"<span style="color: blue">true</span>"<span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.TimedScript.DiscoveryProvider.Custom</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>SCOMskills Custom Timed Script Discovery<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.TimedScript.DiscoveryProvider.Custom</span>" <span style="color: red">SubElementID</span><span style="color: blue">=</span>"<span style="color: blue">CsvFileLocation</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>CSV File Location<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">LanguagePack</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">ManagementPackFragment</span><span style="color: blue">&gt;

</span></pre>
<p><strong><font color="#000000">Fragment 2: Implementing the custom discovery module</font></strong></p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">ManagementPackFragment </span><span style="color: red">SchemaVersion</span><span style="color: blue">=</span>"<span style="color: blue">2.0</span>" <span style="color: red">xmlns:xsd</span><span style="color: blue">=</span>"<span style="color: blue">http://www.w3.org/2001/XMLSchema</span>"<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">Discoveries</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">Discovery </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.TimedScript.Custom.Discovery</span>" <span style="color: red">ConfirmDelivery</span><span style="color: blue">=</span>"<span style="color: blue">false</span>" <span style="color: red">Enabled</span><span style="color: blue">=</span>"<span style="color: blue">true</span>" <span style="color: red">Priority</span><span style="color: blue">=</span>"<span style="color: blue">Normal</span>" <span style="color: red">Remotable</span><span style="color: blue">=</span>"<span style="color: blue">true</span>" <span style="color: red">Target</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.LocalApplication.Class</span>"<span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;</span>Discovery<span style="color: blue">&lt;/</span><span style="color: #a31515">Category</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DiscoveryTypes</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">DiscoveryClass </span><span style="color: red">TypeID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.ApplicationComponent.Class</span>"<span style="color: blue">&gt;
            &lt;</span><span style="color: #a31515">Property </span><span style="color: red">TypeID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.ApplicationComponent.Class</span>" <span style="color: red">PropertyID</span><span style="color: blue">=</span>"<span style="color: blue">CsvField1</span>"<span style="color: blue">/&gt;
            &lt;</span><span style="color: #a31515">Property </span><span style="color: red">TypeID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.ApplicationComponent.Class</span>" <span style="color: red">PropertyID</span><span style="color: blue">=</span>"<span style="color: blue">CsvField2</span>"<span style="color: blue">/&gt;
            &lt;</span><span style="color: #a31515">Property </span><span style="color: red">TypeID</span><span style="color: blue">=</span>"<span style="color: blue">System!System.Entity</span>" <span style="color: red">PropertyID</span><span style="color: blue">=</span>"<span style="color: blue">DisplayName</span>"<span style="color: blue">/&gt;
          &lt;/</span><span style="color: #a31515">DiscoveryClass</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DiscoveryTypes</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DataSource </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">DS</span>" <span style="color: red">TypeID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.TimedScript.DiscoveryProvider.Custom</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Interval</span><span style="color: blue">&gt;</span>60<span style="color: blue">&lt;/</span><span style="color: #a31515">Interval</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">CsvFileLocation</span><span style="color: blue">&gt;</span>c:\ScomSkillsDemo.csv<span style="color: blue">&lt;/</span><span style="color: #a31515">CsvFileLocation</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">PrincipalName</span><span style="color: blue">&gt;</span>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$<span style="color: blue">&lt;/</span><span style="color: #a31515">PrincipalName</span><span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Timeout</span><span style="color: blue">&gt;</span>60<span style="color: blue">&lt;/</span><span style="color: #a31515">Timeout</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DataSource</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">Discovery</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">Discoveries</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">Monitoring</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">LanguagePack </span><span style="color: red">ID</span><span style="color: blue">=</span>"<span style="color: blue">ENU</span>" <span style="color: red">IsDefault</span><span style="color: blue">=</span>"<span style="color: blue">true</span>"<span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
        &lt;</span><span style="color: #a31515">DisplayString </span><span style="color: red">ElementID</span><span style="color: blue">=</span>"<span style="color: blue">SCOMskills.Demo.TimedScript.Custom.Discovery</span>"<span style="color: blue">&gt;
          &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>SCOMskills Timed Script Custom Discovery<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">DisplayString</span><span style="color: blue">&gt;
      &lt;/</span><span style="color: #a31515">DisplayStrings</span><span style="color: blue">&gt;
    &lt;/</span><span style="color: #a31515">LanguagePack</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">LanguagePacks</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">ManagementPackFragment</span><span style="color: blue">&gt;
</span></pre>
<pre class="code"><span style="color: blue"></span>&nbsp;</pre>
<pre class="code"><span style="color: blue"></span>&nbsp;</pre>
<pre class="code"><span style="color: blue"></span>&nbsp;</pre>
<pre class="code"><span style="color: blue"></span>&nbsp;</pre>
<pre class="code"><span style="color: blue"><a href="http://scomskills.com/"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Logo_Main_LinkedIn" border="0" alt="Logo_Main_LinkedIn" src="http://scomskills.com/blog/wp-content/uploads/2013/03/Logo_Main_LinkedIn.png" width="100" height="62"></a></pre>
<p></span></p>
<p>_</p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=357</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logical Disk Free Space monitor doesn&#8217;t cookdown</title>
		<link>http://scomskills.com/blog/?p=343</link>
		<comments>http://scomskills.com/blog/?p=343#comments</comments>
		<pubDate>Mon, 11 Mar 2013 01:17:51 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[Authoring]]></category>
		<category><![CDATA[Buggy]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=343</guid>
		<description><![CDATA[I haven&#8217;t looked at the internals of this monitor in a long time. But recently I was working on a modified disk free space monitoring solution for a customer, and to my surprise uncovered the fact that the built-in logical disk space monitor in the Windows management packs do not utilize cookdown. This had changed [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t looked at the internals of this monitor in a long time. But recently I was working on a modified disk free space monitoring solution for a customer, and to my surprise uncovered the fact that the built-in logical disk space monitor in the Windows management packs do not utilize cookdown. This had changed at some point in time, because I know these monitors&#160; took advantage of cookdown in previous versions.</p>
<p>Fixing this wasn&#8217;t officially a part of the disk monitoring project I was tasked with, but just knowing the fact it didn&#8217;t utilize cookdown was enough to compel me to rewrite the entire workflow. After I fixed the cookdown problem and finished other additions to the disk space monitor, I was going to post a management pack here with an updated logical disk free space monitor&#8230;until I stumbled across a blog entry <a href="http://blogs.technet.com/b/kevinholman/archive/2011/11/17/opsmgr-logical-disk-free-space-alerts-don-t-show-percent-and-mb-free-values-in-the-alert-description.aspx" target="_blank">Kevin Holman posted over a year ago</a>.</p>
<p>I&#8217;m not sure if Kevin realized at the time that his addendum MP fixed the cookdown problem, but it does. <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-hotsmile" alt="Hot smile" src="http://scomskills.com/blog/wp-content/uploads/2013/03/wlEmoticon-hotsmile.png" /> Head over to his blog to download the addendum MP, especially if your company uses a lot of instance level disk space overrides.</p>
<p>&#160;</p>
<p>For those that need a refresher on cookdown, this is a programming technique that (if implemented properly) will execute only one instance of a script data source even if there are multiple monitoring instances that consume the output. The key to cookdown is passing no (or only necessary) configuration elements into the script execution, and processing instance and state filtering after script execution by using expression filters.</p>
<p>If the script expects configuration input, and the monitor configuration is changed by an override, the script will need to run once for each instance override. In the case of the logical disk free space monitor, this leaves a huge door of opportunity to run multiple copies of the data source script, and this will lead to resource consumption on the monitored computer.</p>
<p>&#160;</p>
<p><strong><font color="#f79646" size="2">The built-in logical disk free space data source module (cookdown broken with overrides)</font></strong></p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">DataSourceModuleType </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">Microsoft.Windows.Server.2008.FreeSpace.Moduletype</span>&quot; <span style="color: red">Accessibility</span><span style="color: blue">=</span>&quot;<span style="color: blue">Internal</span>&quot; <span style="color: red">Batching</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot;<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Configuration</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">ComputerName</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:string</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">DiskLabel</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:string</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">IntervalSeconds</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:integer</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">SystemDriveWarningMBytesThreshold</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">SystemDriveWarningPercentThreshold</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">SystemDriveErrorMBytesThreshold</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">SystemDriveErrorPercentThreshold</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">NonSystemDriveWarningMBytesThreshold</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">NonSystemDriveWarningPercentThreshold</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">NonSystemDriveErrorMBytesThreshold</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">NonSystemDriveErrorPercentThreshold</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:double</span>&quot; <span style="color: blue">/&gt;
  &lt;/</span><span style="color: #a31515">Configuration</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">OverrideableParameters</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">Interval</span>&quot; <span style="color: red">Selector</span><span style="color: blue">=</span>&quot;<span style="color: blue">$Config/IntervalSeconds$</span>&quot; <span style="color: red">ParameterType</span><span style="color: blue">=</span>&quot;<span style="color: blue">int</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">SystemDriveWarningMBytesThreshold</span>&quot; <span style="color: red">Selector</span><span style="color: blue">=</span>&quot;<span style="color: blue">$Config/SystemDriveWarningMBytesThreshold$</span>&quot; <span style="color: red">ParameterType</span><span style="color: blue">=</span>&quot;<span style="color: blue">double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">SystemDriveWarningPercentThreshold</span>&quot; <span style="color: red">Selector</span><span style="color: blue">=</span>&quot;<span style="color: blue">$Config/SystemDriveWarningPercentThreshold$</span>&quot; <span style="color: red">ParameterType</span><span style="color: blue">=</span>&quot;<span style="color: blue">double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">SystemDriveErrorMBytesThreshold</span>&quot; <span style="color: red">Selector</span><span style="color: blue">=</span>&quot;<span style="color: blue">$Config/SystemDriveErrorMBytesThreshold$</span>&quot; <span style="color: red">ParameterType</span><span style="color: blue">=</span>&quot;<span style="color: blue">double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">SystemDriveErrorPercentThreshold</span>&quot; <span style="color: red">Selector</span><span style="color: blue">=</span>&quot;<span style="color: blue">$Config/SystemDriveErrorPercentThreshold$</span>&quot; <span style="color: red">ParameterType</span><span style="color: blue">=</span>&quot;<span style="color: blue">double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">NonSystemDriveWarningMBytesThreshold</span>&quot; <span style="color: red">Selector</span><span style="color: blue">=</span>&quot;<span style="color: blue">$Config/NonSystemDriveWarningMBytesThreshold$</span>&quot; <span style="color: red">ParameterType</span><span style="color: blue">=</span>&quot;<span style="color: blue">double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">NonSystemDriveWarningPercentThreshold</span>&quot; <span style="color: red">Selector</span><span style="color: blue">=</span>&quot;<span style="color: blue">$Config/NonSystemDriveWarningPercentThreshold$</span>&quot; <span style="color: red">ParameterType</span><span style="color: blue">=</span>&quot;<span style="color: blue">double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">NonSystemDriveErrorMBytesThreshold</span>&quot; <span style="color: red">Selector</span><span style="color: blue">=</span>&quot;<span style="color: blue">$Config/NonSystemDriveErrorMBytesThreshold$</span>&quot; <span style="color: red">ParameterType</span><span style="color: blue">=</span>&quot;<span style="color: blue">double</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">OverrideableParameter </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">NonSystemDriveErrorPercentThreshold</span>&quot; <span style="color: red">Selector</span><span style="color: blue">=</span>&quot;<span style="color: blue">$Config/NonSystemDriveErrorPercentThreshold$</span>&quot; <span style="color: red">ParameterType</span><span style="color: blue">=</span>&quot;<span style="color: blue">double</span>&quot; <span style="color: blue">/&gt;
  &lt;/</span><span style="color: #a31515">OverrideableParameters</span><span style="color: blue">&gt;
</span></pre>
<p>&#160;</p>
<p><strong><font color="#f79646" size="2">The proper way to implement a script data source to utilize cookdown (configuration and state filtering should happen at the monitor type, not the data source module)</font></strong></p>
<p>&#160;</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">DataSourceModuleType </span><span style="color: red">ID</span><span style="color: blue">=</span>&quot;<span style="color: blue">Microsoft.Windows.Server.2008.Monitoring.Addendum.FreeSpace.ModuleType</span>&quot; <span style="color: red">Accessibility</span><span style="color: blue">=</span>&quot;<span style="color: blue">Internal</span>&quot; <span style="color: red">Batching</span><span style="color: blue">=</span>&quot;<span style="color: blue">false</span>&quot;<span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Configuration</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">IntervalSeconds</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:int</span>&quot; <span style="color: blue">/&gt;
    &lt;</span><span style="color: #a31515">xsd:element </span><span style="color: red">minOccurs</span><span style="color: blue">=</span>&quot;<span style="color: blue">1</span>&quot; <span style="color: red">name</span><span style="color: blue">=</span>&quot;<span style="color: blue">TargetComputerName</span>&quot; <span style="color: red">type</span><span style="color: blue">=</span>&quot;<span style="color: blue">xsd:string</span>&quot; <span style="color: blue">/&gt;
  &lt;/</span><span style="color: #a31515">Configuration</span><span style="color: blue">&gt;
</span></pre>
<p>&#160;</p>
<p>I wonder if Microsoft will plan to fix this in the future. Good thing these modules are flagged internal, so it shouldn&#8217;t be much to ask and an update wouldn&#8217;t break upgrade compatibility for customers.</p>
<p>This post applies to Windows MP versions 6.0.6958 &#8211; 6.0.6989.0.</p>
<p>_</p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=343</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Health Explorer &#8211; Scope is only unhealthy child monitors</title>
		<link>http://scomskills.com/blog/?p=336</link>
		<comments>http://scomskills.com/blog/?p=336#comments</comments>
		<pubDate>Sat, 09 Mar 2013 17:20:39 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[Buggy]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=336</guid>
		<description><![CDATA[This is misleading, as it&#8217;s only true sometimes. Let me show you a clear example with pictures. &#160; The examples below can be reproduced with OpsMgr 2012 SP1 by opening Health Explorer for the Windows Computer object. Example 1 Two unhealthy instances; one critical and the other warning. Health Explorer default behavior Instance in warning [...]]]></description>
			<content:encoded><![CDATA[<p>This is misleading, as it&#8217;s only true sometimes. Let me show you a clear example with pictures.</p>
<p>&#160;</p>
<p>The examples below can be reproduced with OpsMgr 2012 SP1 by opening Health Explorer for the Windows Computer object.</p>
<p><strong><font color="#f79646" size="2"></font></strong></p>
<p><strong><font color="#f79646" size="2">Example 1</font></strong></p>
<p>Two unhealthy instances; one critical and the other warning.</p>
<p><font color="#000000"><strong>Health Explorer default behavior</strong></font></p>
<p>Instance in warning state isn&#8217;t listed with the filter applied.</p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/image.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://scomskills.com/blog/wp-content/uploads/2013/03/image_thumb.png" width="504" height="180" /></a></p>
<p>&#160;</p>
<p><strong><font color="#000000">Remove the unhealthy filter</font></strong></p>
<p>Instance in warning state is listed when filter is removed (as expected).</p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/image1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://scomskills.com/blog/wp-content/uploads/2013/03/image_thumb1.png" width="504" height="653" /></a></p>
<p>&#160;</p>
<p><strong><font color="#f79646" size="2">Example 2</font></strong></p>
<p>Two unhealthy instances; both critical.</p>
<p><font color="#000000"><strong>Health Explorer default behavior</strong></font></p>
<p>Both critical instances are listed.</p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/image2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://scomskills.com/blog/wp-content/uploads/2013/03/image_thumb2.png" width="504" height="208" /></a>.</p>
<p>&#160;</p>
<p><strong><font color="#000000">Remove the unhealthy filter</font></strong></p>
<p>Both critical instances are listed (as expected).</p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/image3.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://scomskills.com/blog/wp-content/uploads/2013/03/image_thumb3.png" width="504" height="649" /></a></p>
<p>&#160;</p>
<p><strong><font color="#f79646" size="2">Example 2</font></strong></p>
<p>Two unhealthy instances; both warning.</p>
<p><font color="#000000"><strong>Health Explorer default behavior</strong></font></p>
<p>Both warning instances are listed. <strong><em>Also notice that HEALTHY instances of the SAME TYPE are also listed.</em></strong></p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/image4.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://scomskills.com/blog/wp-content/uploads/2013/03/image_thumb4.png" width="504" height="410" /></a></p>
<p>&#160;</p>
<p><strong><font color="#000000">Remove the unhealthy filter</font></strong></p>
<p>Both warning instances are listed, as well as everything else (as expected).</p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/image5.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://scomskills.com/blog/wp-content/uploads/2013/03/image_thumb5.png" width="504" height="649" /></a></p>
<p>&#160;</p>
<p>The main takeaway with this post is to beware of the default behavior in Health Explorer &#8211; it might only show you half the truth. I&#8217;m not sure if I&#8217;d go as far as lodging a bug or calling into Microsoft support services for this, but I certainly didn&#8217;t&#8217; expect this behavior with the filtering option.</p>
<p><strong><font color="#000000">&#160;</font></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=336</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Unleashed book is&#8230;well, UNLEASHED!</title>
		<link>http://scomskills.com/blog/?p=322</link>
		<comments>http://scomskills.com/blog/?p=322#comments</comments>
		<pubDate>Fri, 08 Mar 2013 04:24:09 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=322</guid>
		<description><![CDATA[When I was asked to contribute to this book, I didn&#8217;t hesitate at the opportunity to be a part of what is considered to be the most comprehensive technical resource for System Center engineers and enthusiasts around the world. This is the first official publication I&#8217;ve been involved in, and am proud to have had [...]]]></description>
			<content:encoded><![CDATA[<p>When I was asked to contribute to this book, I didn&#8217;t hesitate at the opportunity to be a part of what is considered to be the most comprehensive technical resource for System Center engineers and enthusiasts around the world. This is the first official publication I&#8217;ve been involved in, and am proud to have had the opportunity to share my experiences at this level.</p>
<p>I hope the community receives this book well, and that this edition lives up to its reputation! Thanks to Kerrie Meyler, Cameron Fuller, and John Joyner for doing such a great job in supporting the contributors and to keep things moving along.</p>
<p>&#160;</p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/Unleashed.jpg"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Unleashed" border="0" alt="Unleashed" src="http://scomskills.com/blog/wp-content/uploads/2013/03/Unleashed_thumb.jpg" width="400" height="528" /></a></p>
<p>&#160;</p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/Unleashed_2.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Unleashed_2" border="0" alt="Unleashed_2" src="http://scomskills.com/blog/wp-content/uploads/2013/03/Unleashed_2_thumb.jpg" width="400" height="540" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=322</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Namespace prefix &#8216;maml&#8217; is not defined</title>
		<link>http://scomskills.com/blog/?p=316</link>
		<comments>http://scomskills.com/blog/?p=316#comments</comments>
		<pubDate>Fri, 08 Mar 2013 00:33:39 +0000</pubDate>
		<dc:creator>Jonathan Almquist</dc:creator>
				<category><![CDATA[VSAE Errors]]></category>

		<guid isPermaLink="false">http://scomskills.com/blog/?p=316</guid>
		<description><![CDATA[If you include knowledge articles in your management pack and fail to reference the maml schema, you&#8217;ll see this error during build time. &#160; Error&#160;&#160;&#160;&#160;&#160; 80&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Namespace prefix 'maml' is not defined &#160; &#160; It&#8217;s a very easy fix. Simply add the highlighted below to the management pack fragment and build away. &#60;ManagementPackFragment SchemaVersion=&#34;2.0&#34; xmlns:xsd=&#34;http://www.w3.org/2001/XMLSchema&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>If you include knowledge articles in your management pack and fail to reference the maml schema, you&#8217;ll see this error during build time.</p>
<p>&#160;</p>
<pre class="csharpcode">Error&#160;&#160;&#160;&#160;&#160; 80&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Namespace prefix 'maml' is not defined</pre>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<p><a href="http://scomskills.com/blog/wp-content/uploads/2013/03/clip_image002.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://scomskills.com/blog/wp-content/uploads/2013/03/clip_image002_thumb.jpg" width="404" height="318" /></a></p>
<p>&#160;</p>
<p>It&#8217;s a very easy fix. Simply add the highlighted below to the management pack fragment and build away.</p>
<p><span style="color: blue"></span></p>
<p><span style="color: blue">&lt;</span><span style="color: #a31515">ManagementPackFragment </span><span style="color: red">SchemaVersion</span><span style="color: blue">=&quot;2.0&quot; </span><span style="color: red">xmlns:xsd</span><span style="color: blue">=&quot;http://www.w3.org/2001/XMLSchema&quot; </span><span style="color: red"><font style="background-color: #ffff00">xmlns:maml</font></span><span style="color: blue"><font style="background-color: #ffff00">=&quot;http://schemas.microsoft.com/maml/2004/10&quot;</font>&gt;</p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://scomskills.com/blog/?feed=rss2&#038;p=316</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
