<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>AuthorMPs</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/authormps/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/authormps/feed.xml</link>
    <description>This blog is focused on authoring concepts and samples for System Center Operations Manager (SCOM).  This is the replacement for www.authormps.com.</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:30:05 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Microsoft iSCSI Target 3.3 Released</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/microsoft-iscsi-target-3-3-released</link>
      <pubDate>Tue, 05 Apr 2011 20:47:45 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/04/05/microsoft-iscsi-target-3-3-released/</guid>
      <description><![CDATA[So this is not a normal topic for this blog.&nbsp; 
I will be back soon with some more content but...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: tahoma,arial,helvetica,sans-serif;">So this is not a normal topic for this blog.&nbsp; </span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif;">I will be back soon with some more content but things are fairly busy at the minute in our development cycle!&nbsp; I wanted to share some news from our team (Windows File Server) about one of our technologies which is the Microsoft iSCSI Software Target.&nbsp;&nbsp; This has been available for production use </span><span style="font-family: tahoma,arial,helvetica,sans-serif;">use as part of Windows Storage Server since early 2007. Storage Server is a version of Windows Server that is available only as an OEM branded appliance.&nbsp; It has also been available for development and test use by MSDN and TechNet subscribers starting in May 2009. However, until now, there was no way to use the Microsoft iSCSI Software Target in production on a regular server running Windows Server 2008 R2. As of Monday this has been made publicly available to all users of Windows Server 2008 R2</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif;"></span><span style="font-family: tahoma,arial,helvetica,sans-serif;">Get all the details, including download instructions and FAQ at my one of my colleagues (Jose) blog:</span></p>
<p><a href="https://blogs.technet.com/b/josebda/archive/2011/04/04/microsoft-iscsi-software-target-3-3-for-windows-server-2008-r2-available-for-public-download.aspx">https://blogs.technet.com/b/josebda/archive/2011/04/04/microsoft-iscsi-software-target-3-3-for-windows-server-2008-r2-available-for-public-download.aspx</a></p>
<p>This is very useful for the MP Author.&nbsp; Why you ask?&nbsp; Well using the iSCSI target you can easily set up a cluster in a single Hyper-V host with no external storage so you can test your MP behavior on a cluster.&nbsp; This makes it much more accessible for folks.&nbsp; I will follow up with a quick article on how to set this up.</p>
<p>Enjoy and kudos to our iSCSI Target team to get this delivered!</p>]]></content:encoded>
    </item>
    <item>
      <title>Your MP Discoveries and Clustering</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/your-mp-discoveries-and-clustering</link>
      <pubDate>Sun, 13 Mar 2011 17:37:00 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/03/13/your-mp-discoveries-and-clustering/</guid>
      <description><![CDATA[This is one of a few posts I will likely do on monitoring applications running on clusters using...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri;">This is one of a few posts I will likely do on monitoring applications running on clusters using SCOM.&nbsp; This is one of the areas that does not get much attention from MP developers especially if their applications are not cluster aware.&nbsp; However, there are things you need to consider for every production quality management pack even if your application knows nothing of clusters.&nbsp; I am not going to discuss the Windows 2008 cluster management pack that is available from the management pack catalog.&nbsp; This MP is for monitoring the cluster role itself and not applications on top of the cluster.&nbsp; SCOM has some core pieces for clustering that are there out of the box and this is all I will cover in this post.</span></p>
<p><span style="font-family: Calibri;">Let&rsquo;s start with the basics of a failover cluster.&nbsp; This post is not an introduction to clustering but I wanted to ensure you understand a little about network names and how these relate to computers in SCOM.&nbsp; Testing against clusters can be a pain since clustering is not something you can readily set up in your environment.&nbsp; However there are options here and I will follow up with a post on how to set up a cluster within Hyper-V if you have access to an iSCSI software target.</span></p>
<p><span style="font-family: Calibri;">I am using a two node cluster.&nbsp; To form this I took two domain joined Windows Servers with shared disk between them and followed the simple wizard to create the cluster.&nbsp;&nbsp; When you create a cluster, the cluster name object (CNO) is created and you specify an IP address to use.&nbsp; The screen shot below shows my basic setup:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/6232.image_3EBDE50D.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/6232.image_5F00_3EBDE50D.png"><img height="320" width="495" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/4760.image_thumb_63DB2F79.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/4760.image_5F00_thumb_5F00_63DB2F79.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">So I have the following setup:</span></p>
<ul>
<li><span style="font-family: Calibri;">stwilson7cl01, stwilson7cl02 are physical cluster nodes</span></li>
<li><span style="font-family: Calibri;">stwilson7cl is the cluster name object (this is a network name resource)</span></li>
<li><span style="font-family: Calibri;">Volume Q: is the shared disk I am using for the quorum witness disk</span></li>
</ul>
<p><span style="font-family: Calibri;">Now I am going to add a clustered File Server to the cluster using a second disk I have shared.&nbsp; This is very easy to do using the <strong>Configure a Service or Application</strong> wizard from the failover cluster manager MMC.&nbsp; This File Server adds the following resources to the cluster</span></p>
<ul>
<li><span style="font-family: Calibri;">stwilson7clfs network name</span></li>
<li><span style="font-family: Calibri;">IP address</span></li>
<li><span style="font-family: Calibri;">Volume S:</span></li>
</ul>
<p><span style="font-family: Calibri;">This is shown below:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/6758.image_031DD64D.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/6758.image_5F00_031DD64D.png"><img height="274" width="438" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/2438.image_thumb_14FA6A1A.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/2438.image_5F00_thumb_5F00_14FA6A1A.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">Now lets look at how this cluster appears in SCOM.&nbsp; To monitor this cluster I did the following:</span></p>
<ul>
<li><span style="font-family: Calibri;">Deployed agents to stwilson7cl01 and stwilson7cl02</span></li>
<li><span style="font-family: Calibri;">Set agent proxying to enabled on both nodes</span></li>
<li><span style="font-family: Calibri;">Waited for discovery to occur</span></li>
</ul>
<p><span style="font-family: Calibri;">If you go to the Windows Computer state view in the Operations Console you will see each network name resource in the cluster shown as a computer.&nbsp;&nbsp; In my case I have two network name objects (one for the cluster name, one for the file server name).&nbsp; Therefore I see the two cluster nodes (stwilson7cl01 and stwilson7cl02) and the two additional names (stwilsoncl and stwilsonclfs):</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/5165.image_54C4509F.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/5165.image_5F00_54C4509F.png"><img height="159" width="490" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/6254.image_thumb_4DA51427.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/6254.image_5F00_thumb_5F00_4DA51427.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">Notice that the virtual network names do not show an agent instance on them which is correct because they are actually monitored by the agents on the cluster nodes stwilson7cl01 and stwilson7cl02.</span></p>
<p><span style="font-family: Calibri;">SCOM will manage with agent monitors the applications on each virtual name.&nbsp; Basically the node that has the resource group active with the network name in it will do the monitoring.&nbsp; SCOM handles the failover of this monitoring as the resource group moves between nodes.&nbsp; The detail of this is not the purpose of this post however.</span></p>
<h2><span style="font-family: Calibri;">Cluster Ignorant Discovery</span></h2>
<p><span style="font-family: Calibri;">OK so why as an author do I care.&nbsp; My application is not clustered so I don&rsquo;t need to do anything &ndash; right?&nbsp; Well actually there is a problem with this.&nbsp; Lets look at the basic discovery for an application that is not cluster aware.&nbsp; I am going to use a simple registry based discovery throughout these examples.</span></p>
<p><span style="font-family: Calibri;">For the first example I am going to use a class called <strong>NonClusteredAppX</strong> in my MP (the MP is attached to this post).&nbsp; I have targeted a discovery at the Windows Server class so this would run against all my Windows Servers which is a fairly normal practice.&nbsp; Lets look at the discovery results using a simple state view I added to the MP:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/7725.image_22607D20.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/7725.image_5F00_22607D20.png"><img height="153" width="517" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/0550.image_thumb_6D53EDEF.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/0550.image_5F00_thumb_5F00_6D53EDEF.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">Can you spot the problem?&nbsp; Well I only have two nodes in the cluster but the application has been discovered on the virtual computer objects in the cluster since SCOM treats them as Windows Servers.&nbsp; This is a problem which I will now show.&nbsp; I have added a simple event monitor to my <strong>NonClusteredAppX</strong> class that looks for an event in the event log.&nbsp; To see the full effect of the issue I made sure both resource groups (the cluster and the file server) are running on node one of the cluster.&nbsp; Then I ran the following from the command line on node 1 to generate the event:</span></p>
<p align="center"><span style="font-family: Calibri;">EventCreate &ndash;id 101 &ndash;t information &ndash;d &ldquo;Test&rdquo;</span></p>
<p><span style="font-family: Calibri;">Now the state view shows this:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/0572.image_4CCCAE3D.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/0572.image_5F00_4CCCAE3D.png"><img height="161" width="521" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/4101.image_thumb_45AD71C5.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/4101.image_5F00_thumb_5F00_45AD71C5.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">The problem is the monitor is being run by all instances of the application and you have one on each computer object.</span></p>
<p><span style="font-family: Calibri;">If I had generated an alert from this monitor I would have 3 alerts for the same problem.&nbsp;&nbsp; So as you can see this is something you might want to consider fixing.&nbsp; If you application is indeed not cluster aware the fix is very simple and I cover that next.</span></p>
<p><span style="font-family: Calibri;">If you are following along you can reset the state with this event:</span></p>
<p align="center"><span style="font-family: Calibri;">EventCreate &ndash;id 102 &ndash;t information &ndash;d &ldquo;Test&rdquo;</span></p>
<h2><span style="font-family: Calibri;">Cluster Aware Discovery</span></h2>
<p><span style="font-family: Calibri;">There is a basic feature of the SCOM computer discovery we can take advantage of.&nbsp; There is a boolean property defined on Windows Server called I<strong>sVirtualNode</strong>.&nbsp; This will either be empty or <strong>true</strong> (never false).</span></p>
<p><span style="font-family: Calibri;">For a non clustered application that can&rsquo;t be clustered the basic fix to the discovery is to use this in the filter logic of the discovery.&nbsp; In the MP I have added a new class called <strong>NonClusteredAppY.&nbsp; </strong>For the discovery of this class I have added the logic below:</span></p>
<p><span style="font-family: Calibri;"><span style="color: #0000ff;">&lt;Expression&gt; <br />&nbsp;&nbsp;&nbsp; &lt;And&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Expression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;SimpleExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;XPathQuery Type="Boolean"&gt;Values/ApplicationExists&lt;/XPathQuery&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Operator&gt;Equal&lt;/Operator&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Value Type="Boolean"&gt;true&lt;/Value&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/SimpleExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Expression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Expression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;SimpleExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ValueExpression&gt; <br />&nbsp; <span style="background-color: #ffffff;">&nbsp;&nbsp;&nbsp;&nbsp; <span>&nbsp;</span>&nbsp;&nbsp;&nbsp; </span><span style="background-color: #ffffff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: Calibri;"><span style="color: #0000ff;"><span style="background-color: #ffff00;"><span style="background-color: #ffffff;">&lt;Value&gt;<span style="background-color: #ffff00;">$Target/Property[Type='Windows!Microsoft.Windows.Server.Computer']/IsVirtualNode$</span>&lt;/Value&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Operator&gt;<span style="background-color: #ffff00;">NotEqual</span>&lt;/Operator&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Value Type="Boolean"&gt;<span style="background-color: #ffff00;">true</span>&lt;/Value&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ValueExpression&gt;</span> <br /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/SimpleExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Expression&gt; <br />&nbsp;&nbsp;&nbsp; &lt;/And&gt; <br />&lt;/Expression&gt;</span></span></p>
<p><span style="font-family: Calibri;">Now when this discovery runs, I only get instances created on the physical cluster nodes not the virtual computers.&nbsp; Therefore instead of four instances I correctly get two:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/7737.image_6C7B8805.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/7737.image_5F00_6C7B8805.png"><img height="174" width="509" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/4604.image_thumb_13499E46.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/4604.image_5F00_thumb_5F00_13499E46.png" alt="image" border="0" title="image" 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" /></a><span style="font-family: Calibri;"> <br />So this may be all you have to do!&nbsp; However, if you application is in fact designed to run on a cluster you need to swap this around a bit as the next sections show.</span></p>
<h2><span style="font-family: Calibri;">Cluster Only Application</span></h2>
<p><span style="font-family: Calibri;">If you want to only discover on a virtual computer in a cluster then you basically need to switch the logic around your expression as below:</span></p>
<p><span style="font-family: Calibri;"><span style="color: #0000ff;">&lt;Expression&gt; <br />&nbsp;&nbsp;&nbsp; &lt;SimpleExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Value&gt;$Target/Property[Type='Windows!Microsoft.Windows.Server.Computer']/IsVirtualNode$&lt;/Value&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Operator&gt;<span style="background-color: #ffff00;">Equal</span>&lt;/Operator&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Value Type="Boolean"&gt;true&lt;/Value&gt; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ValueExpression&gt; <br />&nbsp;&nbsp;&nbsp; &lt;/SimpleExpression&gt; <br />&lt;/Expression&gt;</span> <br /></span><span style="font-family: Calibri;"></span></p>
<p><span style="font-family: Calibri;">My ClusteredAppA class in the attached MP shows this logic.&nbsp; Now this will only be discovered on virtual nodes as shown below:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/5265.image_39AB8191.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/5265.image_5F00_39AB8191.png"><img height="192" width="569" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/8308.image_thumb_049EF261.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/8308.image_5F00_thumb_5F00_049EF261.png" alt="image" border="0" title="image" 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" /></a><span style="font-family: Calibri;"></span></p>
<p><span style="font-family: Calibri;">Note that it is likely you need to do more logic in your discovery since your application is probably not running in all resource groups.&nbsp; I cover this at the end of this post.</span></p>
<h2><span style="font-family: Calibri;">Mapping IsVirtualNode</span></h2>
<p><span style="font-family: Calibri;">There is a slight extension to the cluster only application discovery above.&nbsp; In my example MP, my classes are derived from Windows Computer Role.&nbsp; This base class has a hosting relationship to Windows Computer not Windows Server.&nbsp; This means that you can never get back to the fact that your instance is running on a cluster virtual computer object because if you tried to use a $Target/Host/Property expression it would resolve to the Windows Computer class that does not have this property.</span></p>
<p><span style="font-family: Calibri;">Therefore if any subsequent discovery or monitoring that will be targeted at your class needs to have access to this property you should add a property to your application class and map this during discovery.&nbsp; MY ClusteredAppB class shows this.&nbsp; In the discovery I add a mapping:</span></p>
<p><span style="font-family: Calibri; color: #0000ff;">&lt;Setting&gt; <br />&nbsp;&nbsp;&nbsp; &lt;Name&gt;$MPElement[Name="AuthorMPs.Demo.ClusterDiscovery.ClusteredAppB"]/IsVirtualNode$&lt;/Name&gt; <br />&nbsp;&nbsp;&nbsp; &lt;Value&gt;true&lt;/Value&gt; <br />&lt;/Setting&gt;</span></p>
<p><span style="font-family: Calibri;">Note that I se this to true since I know this is always the case since I have already checked in my expression for this.&nbsp; If my application could run on clustered or non clustered I would do this instead:</span></p>
<p><span style="background-color: #ffffff; font-family: Calibri; color: #0000ff;">&lt;Setting&gt; <br />&lt;Name&gt;$MPElement[Name="AuthorMPs.Demo.ClusterDiscovery.ClusteredAppB"]/IsVirtualNode$&lt;/Name&gt; <br />&lt;Value&gt;$Target/Property[Type='Windows!Microsoft.Windows.Server.Computer']/IsVirtualNode$&lt;/Value&gt; <br />&lt;/Setting&gt;</span></p>
<h2><span style="font-family: Calibri;">Clustered and Non Clustered</span></h2>
<p><span style="font-family: Calibri;">The above showed some basics of how you can control cluster discovery and avoid the common pitfall.&nbsp; What if you application can run on a cluster or non-clustered server.&nbsp; In this case you are likely to need to do more than a simple registry discovery.&nbsp; An example of this is SQL server.&nbsp; During the discovery this checks if the current computer it is running against is clustered and also makes sure only instances that match this computer name are discovered on it.&nbsp; The logic is fairly complex and is script based.&nbsp; Most cluster aware application discoveries will be script based since each application has its own way of representing itself as clustered.</span></p>
<p><span style="font-family: Calibri;">If you are using a script based discovery you should definitely consider the seed pattern I </span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/8746/00/00/03/41/24/22/AuthorMPs.Demo.ClusterDiscovery.xml" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-8746-00-00-03-41-24-22/AuthorMPs.Demo.ClusterDiscovery.xml">AuthorMPs.Demo.ClusterDiscovery.xml</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Decentralizing Monitoring Configuration</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/decentralizing-monitoring-configuration</link>
      <pubDate>Fri, 11 Mar 2011 20:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/03/11/decentralizing-monitoring-configuration/</guid>
      <description><![CDATA[SCOM provides rich override capabilities from the console so authorized users can override...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri;">SCOM provides rich override capabilities from the console so authorized users can override configuration such as thresholds, enable / disable or anything marked as overrideable.&nbsp; This allows customers to tune management packs as appropriate before or after deployment.&nbsp; There are times when people want to give some control of this away to the application or server owner and allow them to tune some settings at the monitored server.&nbsp; Care should be taken with this approach and I want to highlight some points:</span></p>
<ul>
<li><span style="font-family: Calibri;">By allowing monitoring to be changed at the source you potentially remove a trail of what went on.&nbsp; If an application owners is screaming at Ops for missing an alert there is little trace of the fact that this was set by the same owner or the server administrator at the source</span> </li>
<li><span style="font-family: Calibri;">Part of the benefit of SCOM in the enterprise is that it can centralize the administration of monitoring.&nbsp; By following this you are potentially removing one of those benefits.</span> </li>
<li><span style="font-family: Calibri;">Behavior in SCOM can be very different between monitored servers.&nbsp; It can be hard to rationalize what monitoring is in effect as overrides affect some and not all monitored servers</span> </li>
<li><span style="font-family: Calibri;">Using configuration at the source can lead to authors writing discoveries that are overly aggressive so that changes are picked up quickly.&nbsp; This can lead to frequent instance space churn if properties are changing a lot.</span> </li>
</ul>
<p><span style="font-family: Calibri;">There are times when this is what the customer wants so I wanted to illustrate one possible approach for this leveraging class properties and discovery from the registry.&nbsp; There are some mitigations you can follow for the above as you go through this:</span></p>
<ul>
<li><span style="font-family: Calibri;">Ensure only people authorized to make changes can actually make the changes.&nbsp; Since you are using the registry in this example you need to be able to edit the registry which usually calls for administrative rights</span> </li>
<li><span style="font-family: Calibri;">Consider a discovery mechanism such as an event to trigger a new discovery rather than using an aggressive polling frequency</span> </li>
<li><span style="font-family: Calibri;">Limit the usage of this to key scenarios not all of your override cases</span> </li>
</ul>
<p><span style="font-family: Calibri;">This is not something you can readily apply to sealed management packs.&nbsp; It is really designed for home grown MPs for your custom monitoring needs as it involves defining new classes and discoveries. </span></p>
<p><span style="font-family: Calibri;">Also note that this is designed for monitoring configuration overrides and not element level overrides such as enable / disable which wont work.&nbsp; It is specifically tailored towards performance thresholds which is the example I use below.&nbsp; However, any monitoring that takes an overrideable parameter could use this in theory.</span></p>
<p><span style="font-family: Calibri;">So if you still want to do this, there are a few variations you can use and I will walk you through these and some of the pitfalls to watch for.&nbsp; </span></p>
<h2><span style="font-family: Calibri;">The Basic MP</span></h2>
<p><span style="font-family: Calibri;">This is a very crude and simple example to show the concepts.&nbsp; I am going to use a single class for each sample and use registry discovery to discover an instance when a registry key exists.&nbsp; I am also going to populate a property on the instance with a value I get from the registry.&nbsp; This is going to be used as a threshold in monitoring.&nbsp; The actual monitoring is done using a simple two state performance threshold monitor.&nbsp; For my example I am going to use the process count performance counter since this is very easy to change just by starting and stopping processes.</span></p>
<p><span style="font-family: Calibri;">In the MP you will see that I use an abstract class as my base class and then I have defined 4 concrete classes from that.&nbsp; This was just to save me time so I could just define the monitor once (targeted to the base class) and a single set of views.&nbsp; Each approach uses a different class so you can see all the examples in the MP.&nbsp; The classes used are:</span></p>
<ol>
<li><span style="font-family: Calibri;">Application X &ndash; used to show the non protected simplest approach</span></li>
<li><span style="font-family: Calibri;">ApplicationX1 &ndash; a minor tweak to the first case to protect against a missing value</span></li>
<li><span style="font-family: Calibri;">Application Y &ndash; uses two discoveries to provide a default value when the value is not set</span></li>
<li><span style="font-family: Calibri;">Application Z &ndash; enhances the two discovery approach to provide an override to the default value</span></li>
</ol>
<p><span style="font-family: Calibri;"><strong><span style="text-decoration: underline;">Disclaimer </span></strong>&ndash; as with all my sample MPs these are samples and should not be used in production.&nbsp; Discovery intervals are aggressive and also the MP is not complete with lots of display strings missing etc.&nbsp; Take this and incorporate into your MPs but use this in a test environment.</span></p>
<h2><span style="font-family: Calibri;">The Monitor</span></h2>
<p><span style="font-family: Calibri;">All the classes will have a monitor instantiated against them.&nbsp; As I mentioned this is a simple two state monitor.&nbsp; The configuration is shown below</span></p>
<p><span style="font-family: Calibri;">&lt;Configuration&gt;     <br />&nbsp; &lt;ComputerName&gt;$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$&lt;/ComputerName&gt;      <br />&nbsp; &lt;CounterName&gt;Processes&lt;/CounterName&gt;      <br />&nbsp; &lt;ObjectName&gt;System&lt;/ObjectName&gt;      <br />&nbsp; &lt;InstanceName/&gt;      <br />&nbsp; &lt;AllInstances&gt;false&lt;/AllInstances&gt;      <br />&nbsp; &lt;Frequency&gt;60&lt;/Frequency&gt;      <br />&nbsp; &lt;Threshold&gt;<span style="background-color: #ffff00;">$Target/Property[Type="AuthorMPs.Demo.PropertyBasedMonitoring.ApplicationBase"]/ProcessThreshold$</span>&lt;/Threshold&gt;      <br />&lt;/Configuration&gt;</span></p>
<p><span style="font-family: Calibri;">They key section is highlighted.&nbsp; This tells the monitor to use the discovered <strong>ProcessThreshold</strong> value on the instance that it is instantiated for rather than a value defined in the monitor configuration.</span></p>
<p><span style="font-family: Calibri;">Once you have one of the discoveries running below and an instance created you can test this out by ensuring your process count is higher than the threshold you set.&nbsp; Once this happens the state will go red and you will get an alert.&nbsp; Once it drops below the value the state returns to healthy and the alert is closed.</span></p>
<p><span style="font-family: Calibri;">The rest of this post is about how we discovered this property.     <br /></span></p>
<p> <span style="font-family: Calibri;"></span></p>
<h2><span style="font-family: Calibri;">Non Protected</span></h2>
<p><span style="font-family: Calibri;">This is the simplest case and is shown with the ApplicationX class and associated discovery.&nbsp; I use a standard registry discovery that checks the existence of a key and also collects a value.&nbsp; If the key exists an instance is created and the value is written as a property and you will see an instance similar to this:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/7450.image_029A0C53.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/7450.image_5F00_029A0C53.png"><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="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/1106.image_thumb_19E510C4.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/1106.image_5F00_thumb_5F00_19E510C4.png" width="294" height="158" /></a></p>
<p><span style="font-family: Calibri;">You can easily try this out by creating the registry key:</span></p>
<p><span style="font-family: Calibri;"><strong>HKLM\Software\AuthorMPs\ApplicationX </strong></span></p>
<p><span style="font-family: Calibri;">You should also create a DWORD value under that key called <strong>ProcessThreshold.</strong>&nbsp; You should put an integer into this value that will be collected and stored on the discovered instance.&nbsp; Once the instance is discovered you can go and test the monitor I describe above.</span></p>
<p><span style="font-family: Calibri;">So that&rsquo;s it right &ndash; we are done.&nbsp; Well this might be OK but there is an important case to consider.&nbsp; If the registry value was and optional setting that the administrator had to go and create it is very likely this is not set everywhere.&nbsp; This causes a problem for our discovery and you can easily test this.&nbsp; Go and delete the registry value <strong>ProcessThreshold</strong> but keep the key.&nbsp; On the next discovery you will get a lovely event 10801 in the Operations Manager log indicating discovery data could not be inserted.&nbsp; There is a lot of detail in this event but the main issue is called out as this:</span></p>
<p><em><span style="font-family: Calibri;">Invalid monitoring class property value specified in the discovery data item.The value needs to adhere to the type.       <br />MonitoringClassPropertyName: AuthorMPs.Demo.PropertyBasedMonitoring.ApplicationBase.ProcessThreshold        <br />MonitoringClassPropertyValue:         <br /></span></em></p>
<p><span style="font-family: Calibri;">You will also see the discovery data item trying to be inserted and notice that the property value is set to empty which is not a valid integer.&nbsp; </span></p>
<p><span style="font-family: Calibri;">Whether this is a problem depends on whether you can rely on the registry value always being there.&nbsp; If you can&rsquo;t you need to do a bit more work.&nbsp; One option is to simply make the class property a string instead of an integer which will take an empty value.&nbsp; However you are possibly pushing the problem downstream so if someone put a string in here your monitoring would fail.&nbsp; Also your monitoring is going to fail on empty anyhow since the performance monitor will actually compare to a threshold of zero and always be in a bad state.&nbsp; So quick fix is just avoiding the issue.</span></p>
<p><span style="font-family: Calibri;">Whether you get an instance in your discovery will depend on the order of setting the registry value.&nbsp; If the <strong>ProcessThreshold</strong> was never set, you will never get an instance since the discovery will fail.&nbsp; If it was set and then removed later, the instance will remain but will never be undiscovered since all future discoveries are failing and will not generate a snapshot.&nbsp; If you removed the registry key itself the instance would be removed.</span></p>
<h2><span style="font-family: Calibri;">Protected with Consequences</span></h2>
<p><span style="font-family: Calibri;">There is another fairly quick fix to the problem but it comes with consequences again which may or may not be an issue for you. </span></p>
<p><span style="font-family: Calibri;">You can update the discovery to check that both the registry key and registry value exist.&nbsp; You can do this easily with the following addition to the expression in the discovery:</span></p>
<p><span style="font-family: Calibri;">&lt;SimpleExpression&gt;     <br />&nbsp; &lt;ValueExpression&gt;      <br />&nbsp;&nbsp;&nbsp; &lt;XPathQuery Type="Integer"&gt;<span style="background-color: #ffff00;">Values/ProcessThreshold</span>&lt;/XPathQuery&gt;      <br />&nbsp; &lt;/ValueExpression&gt;      <br />&nbsp; &lt;Operator&gt;<span style="background-color: #ffff00;">Greater</span>&lt;/Operator&gt;      <br />&nbsp; &lt;ValueExpression&gt;      <br />&nbsp;&nbsp;&nbsp; &lt;Value Type="Integer"&gt;<span style="background-color: #ffff00;">0</span>&lt;/Value&gt;      <br />&nbsp; &lt;/ValueExpression&gt;      <br />&lt;/SimpleExpression&gt;</span></p>
<p><span style="font-family: Calibri;">The ApplicationX1 class shows this in action.&nbsp; It is exactly the same discovery as the ApplicationX class with this one change.&nbsp; You will not get the discovery error above because we never try to write the value or instantiate the class unless the value is present and set to greater than 0.</span></p>
<p><span style="font-family: Calibri;">The downside to this approach is that you must have this threshold set before you class is discovered.&nbsp; If this value is being added just for a small subset of monitoring you want then you just messed up your other monitoring by not discovering unless the admin went and set this.&nbsp; So think about this and see if that is an issue for your scenario.</span></p>
<p><span style="font-family: Calibri;">So we have two solutions so far and neither one are comprehensive.&nbsp; The next options look at setting a default value when there is nothing set in the registry.</span></p>
<h2><span style="font-family: Calibri;">Double Discovery</span></h2>
<p><span style="font-family: Calibri;">There is no easy way (at least that I came up with) to have a single discovery that has conditional logic where you could pull a value from the registry and if it was not there apply a default value instead.&nbsp; You could easily do it with a script but I like to avoid scripts when possible.&nbsp; Registry discoveries are lightweight and less error prone than scripts plus it is a challenge to sort this out.&nbsp; A small additional OR gate module would easily allow this and I have asked for this to be added by the SCOM team before but with no success (it was there for a short period but then withdrawn before shipping!).</span></p>
<p><span style="font-family: Calibri;">So instead we are going to use two discoveries.&nbsp; These are registry discoveries and lightweight so adding one more is a minor overhead and these should not be running that frequency anyhow.&nbsp; In the sample MP ApplicationY shows this double discovery method.</span></p>
<p><span style="font-family: Calibri;">The first discovery is the same as ApplicationX1 above.&nbsp; It will only discover if the key and value are present.&nbsp; The second discovery (with the suffix DefaultValueNoOverride in the MP).&nbsp; Is the interesting one.&nbsp; This is very similar to the first discovery with some subtle changes.&nbsp; First I collect the ProcessThreshold value as a boolean instead of an integer by changing the attribute type parameter:</span></p>
<p><span style="font-family: Calibri;">&lt;RegistryAttributeDefinition&gt;     <br />&nbsp; &lt;AttributeName&gt;ProcessThreshold&lt;/AttributeName&gt;      <br />&nbsp; &lt;Path&gt;SOFTWARE\AuthorMPs\ApplicationY\ProcessThreshold&lt;/Path&gt;      <br />&nbsp; &lt;PathType&gt;1&lt;/PathType&gt;      <br />&nbsp; &lt;AttributeType&gt;<span style="background-color: #ffff00;">0</span>&lt;/AttributeType&gt;      <br />&lt;/RegistryAttributeDefinition&gt;</span></p>
<p><span style="font-family: Calibri;">Next in the expression filter I match only when this is false i.e. the value does not exist.&nbsp; Finally in the mapping configuration I set the ProcessThreshold to a value I specify in the MP e.g. 80 as shown below.</span></p>
<p><span style="font-family: Calibri;">&lt;Setting&gt;     <br />&nbsp; &lt;Name&gt;$MPElement[Name="AuthorMPs.Demo.PropertyBasedMonitoring.ApplicationBase"]/<span style="background-color: #ffff00;">ProcessThreshold</span>$&lt;/Name&gt;      <br />&nbsp; &lt;Value&gt;<span style="background-color: #ffff00;">80</span>&lt;/Value&gt;      <br />&lt;/Setting&gt;</span></p>
<p><span style="font-family: Calibri;">So the logic is:</span></p>
<ul>
<li><span style="font-family: Calibri;">Registry key not present &ndash; both discoveries produces empty discovery data</span></li>
<li><span style="font-family: Calibri;">Registry key present but value not present &ndash; first discovery creates the instance, second discovery produces empty discovery data</span></li>
<li><span style="font-family: Calibri;">Registry key present and value present &ndash; first discovery produces empty discovery data, second discovery creates the instance</span></li>
</ul>
<p><span style="font-family: Calibri;">You can try these combinations out using the MP.&nbsp; Note to discover Application Y use this key:</span></p>
<p><span style="font-family: Calibri;"><strong>HKLM\Software\AuthorMPs\ApplicationY</strong></span></p>
<p><span style="font-family: Calibri;">So that must be it?&nbsp; Well there is one problem with this solution.&nbsp; I had to hardcode this default value in the MP buried in the configuration for the second discovery.&nbsp; This makes it hard to change and it can&rsquo;t be changed via an override.&nbsp; Also if this MP was sealed you are stuck with this default.&nbsp; So we can take this further into the night&hellip;</span></p>
<h2><span style="font-family: Calibri;">Double Discovery with Override</span></h2>
<p><span style="font-family: Calibri;">This is my last attempt I promise.&nbsp; I want to allow the second discovery I used above to take an override that specifies the default value if the registry value is not found.&nbsp; Unfortunately the only way to do this is to define my own composite module type to mimic the standard registry discovery module type that ships in the Windows library MP.</span></p>
<p><span style="font-family: Calibri;">ApplicationZ in the MP shows this approach.&nbsp; The first discovery is the same as the last example except I use the following key:</span></p>
<p><span style="font-family: Calibri;"><strong>HKLM\Software\AuthorMPs\ApplicationZ</strong></span></p>
<p><span style="font-family: Calibri;">The second discovery uses a custom module type called AppZDiscoveryModule that takes two parameters &ndash; frequency and default value.</span></p>
<p><span style="font-family: Calibri;">The AppZDiscoveryModule uses the standard registry discovery but critically makes both of its configuration parameters overrideable.&nbsp; The main piece to note here is the mapping where I use the configuration parameter to set my default:</span></p>
<p><span style="font-family: Calibri;">&lt;Setting&gt;     <br />&nbsp; &lt;Name&gt;$MPElement[Name="AuthorMPs.Demo.PropertyBasedMonitoring.ApplicationBase"]/ProcessThreshold$&lt;/Name&gt;      <br />&nbsp; &lt;Value&gt;<span style="background-color: #ffff00;">$Config/DefaultValue$</span>&lt;/Value&gt;      <br />&lt;/Setting&gt;</span></p>
<p><span style="font-family: Calibri;">So I can now ship the MP with a default value but this can be overriden with a standard override.&nbsp; You can find the override by locating the discovery in the Object Discovery view of the Authoring Space of the console.&nbsp; When you override it you will see that DefaultValue is overrideable as well as frequency:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/0118.image_40B32704.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/0118.image_5F00_40B32704.png"><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="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/4010.image_thumb_3993EA8C.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/4010.image_5F00_thumb_5F00_3993EA8C.png" width="425" height="172" /></a></p>
<p><span style="font-family: Calibri;"></span></p>
<p><span style="font-family: Calibri;">You can try this out by creating the ApplicationZ reg key above and not setting a ProcessThreshold value.&nbsp; The instance should be discovered with 77 by default.&nbsp; Now override the default to say 88 and wait for the configuration change to go down and the next discovery to run.&nbsp; You should see 88 written.</span></p>
<p><span style="font-family: Calibri;">To check that we still honor the real value when set, go and add the registry value and ensure that this is written in preference to the default value.</span></p>
<p><span style="font-family: Calibri;">Note you could definitely write this composite module type better and reuse it between the two discoveries but this was just an illustration!</span></p>
<h2><span style="font-family: Calibri;">Conclusion</span></h2>
<p><span style="font-family: Calibri;">There is a lot of concepts here!&nbsp; I just wanted to explore this solution a bit and show you that there are different levels of rigor you could approach this with.&nbsp; You may be OK to stop at the first solution if you can guarantee the value is always there.&nbsp; The choice is yours &ndash; have fun!     <br /></span></p>
<p><span style="font-family: Calibri;"></span></p>
<p><strong><span style="font-family: Calibri; font-size: large;"></span></strong></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/8746/00/00/03/41/22/08/AuthorMPs.Demo.PropertyBasedMonitoring.xml" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-8746-00-00-03-41-22-08/AuthorMPs.Demo.PropertyBasedMonitoring.xml">AuthorMPs.Demo.PropertyBasedMonitoring.xml</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Installation of Authoring Resource Kit on .Net 4.0</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/installation-of-authoring-resource-kit-on-net-4-0</link>
      <pubDate>Thu, 10 Mar 2011 11:42:00 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/03/10/installation-of-authoring-resource-kit-on-net-4-0/</guid>
      <description><![CDATA[If you are using the Authoring Console and are having problems trying to install it if you only have...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri;">If you are using the Authoring Console and are having problems trying to install it if you only have .Net 4.0 installed please see the article below from the SCOM support team.</span></p>
<p><a href="https://blogs.technet.com/b/operationsmgr/archive/2011/03/10/new-kb-installation-of-system-center-operations-manager-r2-authoring-resource-kit-fails-on-net-4-0-enabled-computers.aspx" title="https://blogs.technet.com/b/operationsmgr/archive/2011/03/10/new-kb-installation-of-system-center-operations-manager-r2-authoring-resource-kit-fails-on-net-4-0-enabled-computers.aspx">https://blogs.technet.com/b/operationsmgr/archive/2011/03/10/new-kb-installation-of-system-center-operations-manager-r2-authoring-resource-kit-fails-on-net-4-0-enabled-computers.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Visualizing the MP Schema</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/visualizing-the-mp-schema</link>
      <pubDate>Tue, 08 Mar 2011 09:30:00 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/03/08/visualizing-the-mp-schema/</guid>
      <description><![CDATA[Did you know you can use any edition of Visual Studio to easily visualize and walk through the MP...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri;">Did you know you can use any edition of Visual Studio to easily visualize and walk through the MP Schema?&nbsp; I got a few complaints when I removed the schema documentation from authormps.com that the diagrams were nice and they were not available in the MSDN schema documentation.&nbsp; This visual documentation was exported from <a href="https://www.altova.com/xmlspy.html">Altova XML Spy</a> which is an awesome XML editing tool but fairly expensive.&nbsp; However there is an equally good way to view the schema using Visual Studio.</span></p>
<p><span style="font-family: Calibri;">First, make sure you have the MP Schema files.&nbsp; You get these when you install the Authoring Console (latest version <a href="https://www.microsoft.com/downloads/en/details.aspx?FamilyID=9104af8b-ff87-45a1-81cd-b73e6f6b51f0">here</a>).&nbsp; The installation will create a <strong>MP Schema</strong> directory in your installation folder.&nbsp; In this directory is the <strong>ManagementPacklSchema.xsd</strong> and other supporting files.&nbsp; Note that if you copy these somewhere else you need all the files in the sub directories as well since the main schema file references this.</span></p>
<p><span style="font-family: Calibri;">Next, ensure you have some version of Visual Studio 2010.&nbsp; If you have an MSDN license you can get a full version from there or you company may be licensed for it.&nbsp; The XML schema explorer ships with all versions except the Express versions.&nbsp; </span></p>
<p><span style="font-family: Calibri;">Once you have installed Visual Studio, run the program and open the <strong>ManagementPackSchema.xsd</strong> file.&nbsp; You should get a view as as shown below by default.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/7024.image_32A845EA.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/7024.image_5F00_32A845EA.png"><img height="428" width="604" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/8015.image_thumb_0231C174.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/8015.image_5F00_thumb_5F00_0231C174.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">If you do not see the XML Schema Explorer available on the right then click the link <strong>XML Schema Explorer</strong> to open it.&nbsp;&nbsp; Locate the <strong>&lt;&gt;ManagementPack </strong>element in the list under the <strong>Empty Namespace</strong>, <strong>ManagementPackSchema.xsd</strong> in the tree view.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/5466.image_23ED7438.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/5466.image_5F00_23ED7438.png"><img height="436" width="219" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/8103.image_thumb_4ABB8A78.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/8103.image_5F00_thumb_5F00_4ABB8A78.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">Drag this onto the design surface and you get an object that is fairly useless and does not look like you can do anything:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/2158.image_5C981E45.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/2158.image_5F00_5C981E45.png"><img height="449" width="609" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/0676.image_thumb_22A8DB59.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/0676.image_5F00_thumb_5F00_22A8DB59.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">Now switch to the content model view which is the second tool bar icon from the left:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/0508.image_4D813F6B.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/0508.image_5F00_4D813F6B.png"><img height="18" width="612" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/5126.image_thumb_5B538566.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/5126.image_5F00_thumb_5F00_5B538566.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">You should now see a workspace column on the left.&nbsp; You need to drag the management pack element onto the surface if it is not already there:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/7853.image_02219BA7.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/7853.image_5F00_02219BA7.png"><img height="346" width="597" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/7851.image_thumb_7B025F2E.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/7851.image_5F00_thumb_5F00_7B025F2E.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">Now you can expand the management pack element and drill into each area of the MP in a great visual way.&nbsp; Below is an example of drilling into the <strong>ClassType </strong>element</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/6215.image_489E8BAF.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/6215.image_5F00_489E8BAF.png"><img height="339" width="585" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/0458.image_thumb_47967605.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/0458.image_5F00_thumb_5F00_47967605.png" alt="image" border="0" title="image" 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" /></a></p>
<p><span style="font-family: Calibri;">If you want to jump to the XSD file to explore some more just right click on the element, attribute or type you want and select <strong>View Code </strong>and you will be taken in context to the correct place in the schema.</span></p>
<p><span style="font-family: Calibri;">Update</span></p>
<p><span style="font-family: Calibri;">Just adding to this post some information about getting the intellisense look up in the schema in Visual Studio when you are editing a Management Pack.&nbsp; When I post this in the comments section the text is getting stripped out so posting it here.&nbsp; Your MP declaration should be the following to point to the MP schema XSD.</span></p>
<p><span style="font-family: Calibri;"><span style="color: #0000ff;">&lt;ManagementPack xsi:noNamespaceSchemaLocation="c:\MPSchema\ManagementPackSchema.xsd" xmlns:xsd="</span><a href="https://www.w3.org/2001/XMLSchema"><span style="color: #0000ff;">https://www.w3.org/2001/XMLSchema</span></a><span style="color: #0000ff;">" xmlns:xsi="</span><a href="https://www.w3.org/2001/XMLSchema-instance"><span style="color: #0000ff;">https://www.w3.org/2001/XMLSchema-instance</span></a><span style="color: #0000ff;">"&gt;</span></span></p>
<p><span style="font-family: Calibri;"><br /><span style="color: #0000ff;">&lt;/ManagementPack&gt;</span><br /></span></p>]]></content:encoded>
    </item>
    <item>
      <title>State Based Vs. Stateless monitoring</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/state-based-vs-stateless-monitoring</link>
      <pubDate>Mon, 07 Mar 2011 09:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/03/07/state-based-vs-stateless-monitoring/</guid>
      <description><![CDATA[This is more of a philosophical post I wanted to write based on some recent conversations I have had...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri;">This is more of a philosophical post I wanted to write based on some recent conversations I have had in my team when trying to educate some people on SCOM and management packs.&nbsp; There are different opinions on this and these are only mine.&nbsp; Feel free to disagree and feel free to post some comments if you do.</span></p>
<p><span style="font-family: Calibri;">Within SCOM you have two overarching choices for monitoring &ndash; state based and stateless.&nbsp; Lets look at each and the benefits / drawbacks each one has and then I will get to the crux of things and why I think you should not try to force state based monitoring on something that you cannot really model the state.</span></p>
<p><span style="font-family: Calibri;">Both of these approaches rely on some model of an application and discovery or that application and its components.&nbsp; I am not going to focus on this end to end except where it can impact your choice of stateless or state based monitoring.&nbsp; Also since notification can be used in both cases I will leave that out of the argument.</span></p>
<h2><span style="font-family: Calibri;">Stateless Monitoring</span></h2>
<p><span style="font-family: Calibri;">I will start with stateless.&nbsp; In this model you are going to be using rules to generate alerts.&nbsp; The model here is that a rule responds to an interesting event and raises an alert which to an operator.&nbsp; The rule can optionally:</span></p>
<ul>
<li><span style="font-family: Calibri;">Suppress or limit future alerts while the original alert is still open</span> </li>
<li><span style="font-family: Calibri;">Run some action such as a script as well as generate the alert (note this cannot be added to a rule that was shipped in a sealed MP)</span> </li>
</ul>
<p><span style="font-family: Calibri;">Rules are simple and have been with us a long time before any type of state based monitoring was provided (and I am sure will be with us a lot longer).&nbsp; It is simple &ndash; I see something I care about I raise an alert.</span></p>
<p><span style="font-family: Calibri;">As with all monitoring in SCOM, state based monitoring is targeted at a class.&nbsp; You may or may not go to a granular level of monitoring with stateless monitoring and in many ways doing deep monitoring is less interesting since you are not going to be controlling state.&nbsp; For example suppose I have a simple management pack and I model an application X with one or more components.&nbsp; My instance space may look like this.</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/3527.image_1E7A6033.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/3527.image_5F00_1E7A6033.png"><img height="240" width="197" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/1462.image_thumb_4DCBD5BD.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/1462.image_5F00_thumb_5F00_4DCBD5BD.png" alt="image" border="0" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" title="image" /></a></p>
<p><span style="font-family: Calibri;">Now if I want to target some stateless monitoring for the App X class.&nbsp; This is simple, I create some rules and target it at the App X class.&nbsp; This will ensure that it only runs where I have discovered an instance of App X.&nbsp; </span></p>
<p><span style="font-family: Calibri;">For the App X component class I have a couple of choices with stateless monitoring.&nbsp; I could either model things as above and target my rules at App X component.&nbsp; I would then use some property of the App X component class as criteria for my monitoring so I can tell which instrumentation is for which instance e.g.</span></p>
<ul>
<li><span style="font-family: Calibri;">Rule target: App X Component</span></li>
<li><span style="font-family: Calibri;">Rule criteria: Event 101 from event source Application X where Param1 is Component ID</span></li>
<li><span style="font-family: Calibri;">Suppression: Suppress on workflow</span></li>
</ul>
<p><span style="font-family: Calibri;">I will have at most one alert active for any instance of App X component although I could choose to have more by changing the suppression logic in my rule.</span></p>
<p><span style="font-family: Calibri;">However since I am not monitoring the state of the Application X component you could ask what this deeper modeling is actually buying you other than more logic in your discovery.&nbsp; You could equally simplify your model to this and do away with your component class:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/4760.image_7B4CF580.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/4760.image_5F00_7B4CF580.png"><img height="123" width="159" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/5353.image_thumb_01FFFF04.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/5353.image_5F00_thumb_5F00_01FFFF04.png" alt="image" border="0" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" title="image" /></a></p>
<p><span style="font-family: Calibri;">Now you could create the same rule as follows:</span></p>
<ul>
<li><span style="font-family: Calibri;">Rule target: App X</span></li>
<li><span style="font-family: Calibri;">Rule criteria: Event 101 from event source Application X where Param1 is Component ID</span></li>
<li><span style="font-family: Calibri;">Suppression: Suppress on Param1 (component ID)</span></li>
</ul>
<p><span style="font-family: Calibri;">As with the previous case I will still have at most one alert active for any instance of App X component at a time because I handled this in my suppression.&nbsp; However, I have not modeled the App X component.</span></p>
<p><span style="font-family: Calibri;">While the monitoring is effectively the same for this case there are other benefits to modeling to a deeper level.&nbsp; Some of these are as follows:</span></p>
<ul>
<li><span style="font-family: Calibri;">You can pivot to alerts / events / performance about a specific object in the console</span></li>
<li><span style="font-family: Calibri;">You can report on monitoring data at a more granular level</span></li>
<li><span style="font-family: Calibri;">You can create tasks against a component that use component properties to run</span></li>
</ul>
<p><span style="font-family: Calibri;">So you have the option of what you want to do and achieve.&nbsp; The point about stateless monitoring is that you are not forced to monitor to a deep level.&nbsp; Hold this thought as I will show you that with state based monitoring you may actually be forced to model deeper than you want.</span></p>
<p><span style="font-family: Calibri;">With stateless monitoring, once an alert is generated, there is no understanding of when the problem is resolved.&nbsp;&nbsp; A user (or automated system like a connector) must close the alert.&nbsp; Depending on suppression settings of individual rules, new alerts may or may not get generated until this is done.&nbsp; You are forcing the diagnosis and resolution state of problems to the operator of the system which may indeed be valid if you application has no understanding of it&rsquo;s own state.</span></p>
<p><span style="font-family: Calibri;"></span></p>
<h2><span style="font-family: Calibri;">State Based Monitoring</span></h2>
<p><span style="font-family: Calibri;">With state based monitoring you are using monitors as your primary method.&nbsp; As you likely know monitors are very different to rules.&nbsp; Some basic characteristics of normal monitors:</span></p>
<ul>
<li><span style="font-family: Calibri;">Monitors have two or three states</span></li>
<li><span style="font-family: Calibri;">States can be automatically determined (instrumentation / timer) or manually set</span></li>
<li><span style="font-family: Calibri;">Monitors can optionally alert based on state</span></li>
<li><span style="font-family: Calibri;">Monitors can optionally close alerts based on state</span></li>
<li><span style="font-family: Calibri;">A maximum of one alert from a single monitor can be active</span></li>
<li><span style="font-family: Calibri;">Monitors can roll up to other monitors</span></li>
</ul>
<p><span style="font-family: Calibri;">When thinking about state based and stateless monitoring choices there are a few areas I want to focus on.</span></p>
<p><span style="font-family: Calibri;">The idea of a monitor is that at any point of time it should know the state of a part of your model.&nbsp; There should be no doubt.&nbsp; When a monitor shows red in the console it should mean there is a problem right now.&nbsp; This is very different to an alert from a rule that shows at some point there was a problem.&nbsp; </span><span style="font-family: Calibri;">While this idea sounds great, in practice there are a number of monitor types that break this concept:</span></p>
<ul>
<li><span style="font-family: Calibri;">Timer based reset monitors &ndash; the unhealthy state of a monitor can be detected but there is no way to detect a good state.&nbsp; Instead a timer is set so that the monitor will reset after a specified period of time. </span></li>
<li><span style="font-family: Calibri;">Manual reset monitors &ndash; the unhealthy state of a monitor can be detected but there is no way to detect a good state.&nbsp; The user must manually reset the monitor when this is known to be true.</span></li>
</ul>
<p><span style="font-family: Calibri;">To me this breaks the whole concept of state based monitoring and using these types of monitors should have a very good reason (there are a few).&nbsp; You don&rsquo;t understand the state of the system at any given time and instead you are making a prediction that the problem may have gone away in one case and in the other you are forcing a user to manually intervene.&nbsp; Logically both of these should probably have been done by a stateless rule.&nbsp; Monitors do have some benefits over rules though:</span></p>
<ul>
<li><span style="font-family: Calibri;">You can report on availability over time</span></li>
<li><span style="font-family: Calibri;">You can populate state views in the console</span></li>
<li><span style="font-family: Calibri;">You can run diagnostics and recovery workflows based on a state change</span></li>
<li><span style="font-family: Calibri;">Diagnostics and recoveries are extensible by customers even against sealed MPs</span></li>
<li><span style="font-family: Calibri;">You can roll up health through a health model on the same object or across discovered relationships</span></li>
</ul>
<p><span style="font-family: Calibri;">So when you think about monitors think about whether the benefits of the above outweigh the issue you are not accurately representing the state and you should ensure customer expectations are set on the behavior of these monitoring.</span></p>
<p><span style="font-family: Calibri;">To be honest I have seen lots of examples of state based monitors that use manual / timer reset monitors that could actually be rewritten to properly determine the good state.&nbsp; This may involve some sort of polling of system state for the good state.&nbsp; While this may require the definition of a new monitor type and a bit more development time, the benefits to the customer definitely outweigh the effort it will take you to do this.</span></p>
<p><span style="font-family: Calibri;">In terms of modeling, using monitors may force you to model classes deeper than you want.&nbsp; This may not be a bad thing but at some point you will stop.&nbsp; For example when monitoring a database server you may want to model down to the database level but modeling to the table or even row level with classes is not where you want to go.&nbsp; Using the example above, let&rsquo;s consider the simple model:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/5584.image_01A43300.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/5584.image_5F00_01A43300.png"><img height="123" width="159" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/4034.image_thumb_409AD4FD.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/4034.image_5F00_thumb_5F00_409AD4FD.png" alt="image" border="0" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" title="image" /></a></p>
<p><span style="font-family: Calibri;">Now I want to alert before on the App X component but assume I do not want to model this level in my application.&nbsp; If I know 101 is the good event and 102 is the bad event you might assume you can do the following and create a monitor:</span></p>
<ul>
<li><span style="font-family: Calibri;">Monitor type: 2 state event based</span></li>
<li><span style="font-family: Calibri;">Monitor target: App X</span></li>
<li><span style="font-family: Calibri;">State 1 (unhealthy): Event 101 from event source Application X</span></li>
<li><span style="font-family: Calibri;">State 2 (healthy): Event 102 from event source Application X</span></li>
</ul>
<p><span style="font-family: Calibri;">Monitors cannot define alert suppression since you get a maximum of one alert form a given monitor.</span></p>
<p><span style="font-family: Calibri;">This monitor will have a major problem.&nbsp; If you have two components (Comp1 and Comp2) consider this:</span></p>
<ul>
<li><span style="font-family: Calibri;">Comp1 throws event 101 &ndash; monitor goes unhealthy</span></li>
<li><span style="font-family: Calibri;">Comp2 throws event 101 &ndash; no state change since monitor is already unhealthy</span></li>
<li><span style="font-family: Calibri;">Comp2 throws event 102 &ndash; monitor goes healthy</span></li>
</ul>
<p><span style="font-family: Calibri;">In this flow we are broken.&nbsp; Comp1 is still in a bad state and we are showing healthy for Application X.&nbsp; You may think this is obvious but I have seen this many times in MPs and this is what drove me to write this post.</span></p>
<p><span style="font-family: Calibri;">If you are using a monitor you have to be able to aggregate what you are doing to the class the monitor targets.&nbsp; In the above example you would want to consider how you would know across all components whether App X is health or not healthy.&nbsp; You may not be able to do this using events.&nbsp; The other option is of course to model deeper:</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/6574.image_402EA208.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/6574.image_5F00_402EA208.png"><img height="240" width="197" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/4024.image_thumb_26C69ECE.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/4024.image_5F00_thumb_5F00_26C69ECE.png" alt="image" border="0" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" title="image" /></a></p>
<p><span style="font-family: Calibri;">Now the monitor would be defined as follows:</span></p>
<ul>
<li><span style="font-family: Calibri;">Monitor type: 2 state event based</span></li>
<li><span style="font-family: Calibri;">Monitor target: App X Component</span></li>
<li><span style="font-family: Calibri;">State 1 (unhealthy): Event 101 from event source Application X where parameter 1 matches Component ID</span></li>
<li><span style="font-family: Calibri;">State 2 (healthy): Event 102 from event source Application X where parameter 1 matches component ID</span></li>
</ul>
<p><span style="font-family: Calibri;">Optionally you might define a dependency monitor on the App X class to roll up health from the components.&nbsp; Now the monitor targeted at the component class above is just responsible for a single component and uses event parameters to filter out events about other components.</span></p>
<p><span style="font-family: Calibri;">Note that monitors have another characteristic to be very aware of when you are choosing between a monitor and a rule.&nbsp; The alert generated from a monitor is effectively separated from the monitor state.&nbsp; Subsequent changes to the alert will not affect the monitor state.&nbsp; The major concern here is when the alert is resolved in the console.&nbsp; This act will not currently reset the monitor at all.&nbsp; If the monitor was unhealthy and the alert is resolved, the monitor will still be unhealthy until the healthy event is seen.&nbsp; Critically this means no future alerts will be generated from this monitor instance until the thing it is monitor is either manually reset using health explorer or the object returns to a health state itself and then goes back to a bad state.&nbsp; Using manual reset monitors make this worse &ndash; once a user resolves the alert it is never coming back till someone goes and resets the monitor which is a very bad experience.</span></p>
<h2><span style="font-family: Calibri;">Conclusion</span></h2>
<p><span style="font-family: Calibri;">So should you use state based or stateless monitoring?&nbsp; The answer is both.&nbsp; There are reasons to use both of them and the day we can get away from stateless monitoring are a long way away.&nbsp; As a result you are very likely to be using both in your management packs.&nbsp; My advice would be:</span></p>
<ul>
<li><span style="font-family: Calibri;">Make sure you understand the capabilities and differences of monitors / rules</span></li>
<li><span style="font-family: Calibri;">Model to an appropriate level in your management pack &ndash; don&rsquo;t ship hundreds of classes that are not of interest to customers just so you can use monitors as you want to</span></li>
<li><span style="font-family: Calibri;">Use monitors where you can accurately determine all states via instrumentation</span></li>
<li><span style="font-family: Calibri;">Use rules when you cannot determine state but there are important alerts to raise</span></li>
<li><span style="font-family: Calibri;">Use rules or aggregated monitors to monitor levels of an application you do not want to model down to</span></li>
<li><span style="font-family: Calibri;">Limit your use of manual reset / timer based reset monitors.&nbsp; When you use them be sure you understand the impact to customers</span></li>
</ul>
<p><span style="font-family: Calibri;">You should definitely strive for state based monitoring where possible but my key message out of all of this is not to be afraid of using rules still.&nbsp; Do not force state on something that is inherently stateless.&nbsp; </span></p>
<p><span style="font-family: Calibri;">Finally, if you own the application you are building a management pack for then think about how you can improve your instrumentation to move towards being able to use monitors more by understanding and exposing application state better.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Seed Based Discovery Concepts</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/seed-based-discovery-concepts</link>
      <pubDate>Fri, 25 Feb 2011 09:01:00 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/02/25/seed-based-discovery-concepts/</guid>
      <description><![CDATA[Seed based discovery is a reasonably common concept that is used in many Microsoft MPs. There are a...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Seed based discovery is a reasonably common concept that is used in many Microsoft MPs. There are a few articles out there such as this </span></span><span style="font-size: 11pt;"><a href="https://social.technet.microsoft.com/wiki/contents/articles/mp-best-practice-using-the-seed-pattern-for-easy-discovery.aspx"><span style="font-family: Calibri; color: #0000ff;"><span style="text-decoration: underline;">detailed one</span></span></a></span><span style="font-family: Calibri;"><span style="font-size: 11pt;"> by Dan Rogers.<span style="mso-spacerun: yes">&nbsp; </span>However I was trying to explain this to someone in my team recently and realized it was not that clear exactly why and when to use it. I wanted to make sure I had a worked example to really illustrate this concept.<span style="mso-spacerun: yes">&nbsp; </span>There is also an alternative approach to consider instead of a seed but it does have issues so I wanted to walk through this topic in detail and show you why you might not want to use it.<span style="mso-spacerun: yes">&nbsp; </span>If you don&rsquo;t get to the end of this article, the bottom line is that you should go with the first approach (the seed method) when using scripts for discovery.</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Let&rsquo;s start by looking at a standard discovery with no seed concept. Let&rsquo;s say you have an application running on Windows and you want to define a class for the application and discover it. Let&rsquo;s assume that this runs on any version of Windows Server. You would define your class something like the following:</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span></span></p>
<p class="MsoNormal"><span style="color: #0000ff;"><span style="font-family: Calibri;"><span style="font-size: 11pt;">&lt;ClassType ID="AuthorMPs.Demo.ApplicationX" Abstract="false" Accessibility="Internal" Hosted="true" Base="Windows!Microsoft.Windows.LocalApplication"/&gt;</span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Now if you want to discover this using a simple registry based discovery you might create a discovery targeted at Windows Server </span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="color: #0000ff;">&lt;Discovery ID="AuthorMPs.Demo.ApplicationX.Discovery" Target="Windows!Microsoft.Windows.Server.Computer" Remotable="false" Enabled="true"&gt;<br />&nbsp; &lt;!--Registry based discovery Logic in here--&gt;<br />&lt;/Discovery&gt;</span></span></span></p>
<p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">This all seems reasonable so far. What will happen in this case when this MP is imported into your management group is that the MP will be sent to every computer that has an instance of the Windows Server class discovered i.e. it will go to every Windows Server you have. Then the discovery workflow will be loaded and run on each server.<span style="mso-spacerun: yes">&nbsp; </span>This discovery will stay loaded and keep running on whatever interval you set in your registry discovery even if the application is not found.<span style="mso-spacerun: yes">&nbsp; </span>This is done because the application could be installed at any point and then you want SCOM to pick it up.<span style="mso-spacerun: yes">&nbsp; </span>In this example you would end up with a single instance of the class hosted on servers that had the application installed as below:</span></span></p>
<p class="MsoNormal" align="center"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/7416.clip_image0028_0DDAA566.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/7416.clip_5F00_image0028_5F00_0DDAA566.png"><img height="126" width="174" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/5353.clip_image0028_thumb_66A05C30.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/5353.clip_5F00_image0028_5F00_thumb_5F00_66A05C30.png" alt="clip_image002[8]" border="0" title="clip_image002[8]" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">For a registry based discovery this is not a major concern.<span style="mso-spacerun: yes">&nbsp; </span>SCOM is very efficient at running these discoveries and they are usually not schedule to run more than every few hours so it is very little overhead to the server it runs on.</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">However, the problem comes when you need more than a registry based discovery to discover the application fully.<span style="mso-spacerun: yes">&nbsp; </span>It may be that you need a complex script to discover the application including the properties you need and any components.<span style="mso-spacerun: yes">&nbsp; </span>In this situation you need to be careful especially if you are building MPs to ship to customers.<span style="mso-spacerun: yes">&nbsp; </span>You want to minimize the execution of scripts on servers where possible and running a full blow discovery script on a scheduled interval is likely overhead you can avoid.<span style="mso-spacerun: yes">&nbsp; </span>This is where the seed concept comes in.</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">The seed concept involves introducing a second class that acts as the primary discovery.<span style="mso-spacerun: yes">&nbsp; </span>This will not result in the full discovery of the application and is only there to trigger a second stage discovery that will do the real discovery.<span style="mso-spacerun: yes">&nbsp; </span>For example we may introduce a seed class as below:</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="color: #0000ff;">&lt;ClassType ID="AuthorMPs.Demo.ApplicationXSeed" Abstract="false" Accessibility="Internal" Hosted="true" Base="Windows!Microsoft.Windows.LocalApplication"/&gt;<br />&lt;ClassType ID="AuthorMPs.Demo.ApplicationX" Abstract="false" Accessibility="Internal" Hosted="true" Base="Windows!Microsoft.Windows.LocalApplication"&gt;<br />&nbsp; &lt;Property ID="Version" Type="string"/&gt;<br />&nbsp; &lt;Property ID="SomeProperty1" Type="string"/&gt;<br />&nbsp; &lt;Property ID="SomeProperty2" Type="string"/&gt;<br />&lt;/ClassType&gt;</span><br /></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span></span>&nbsp;</p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Now I build my first discovery to identify that the application is present on the system with a simple registry based discovery.<span style="mso-spacerun: yes">&nbsp; </span>This is my seed discovery and is targeted at Windows Server in this example:</span></span></p>
<p class="MsoNormal"><span style="color: #0000ff;"><span style="font-family: Calibri;"><span style="font-size: 11pt;">&lt;Discovery ID="AuthorMPs.Demo.ApplicationX.SeedDiscovery" Target="Windows!Microsoft.Windows.Server.Computer" Remotable="false" Enabled="true"&gt;<br />&nbsp; &lt;!--Registry based discovery Logic in here--&gt;<br />&lt;/Discovery&gt;<br /></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span></span><span style="color: #0000ff;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">If this seed was discovered it indicates my application is there.<span style="mso-spacerun: yes">&nbsp; </span>However I am not ready to start monitoring yet.<span style="mso-spacerun: yes">&nbsp; </span>I need to discover the application fully and I need a complex script to do this.<span style="mso-spacerun: yes">&nbsp; </span>So I now add a second discovery that is targeted at the seed class.<span style="mso-spacerun: yes">&nbsp; </span>This will only run once I have validated the application is present.</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="color: #0000ff;">&lt;Discovery ID="AuthorMPs.Demo.ApplicationX.Discovery" Target="AuthorMPs.Demo.ApplicationXSeed" Remotable="false" Enabled="true"&gt;<br />&nbsp; &lt;!--Script based discovery Logic in here--&gt;<br />&lt;/Discovery&gt;</span></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">This discovery will do whatever complex scripting it needs to do to discover one or more instances for the application.<span style="mso-spacerun: yes">&nbsp; </span>From here on things are normal.<span style="mso-spacerun: yes">&nbsp; </span>So the flow is:</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span></span>&nbsp;</p>
<p class="MsoNormal" align="center"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/0871.clip_image0048_1897FCBB.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/0871.clip_5F00_image0048_5F00_1897FCBB.png"><img height="439" width="599" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/1452.clip_image0048_thumb_5457956E.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/1452.clip_5F00_image0048_5F00_thumb_5F00_5457956E.png" alt="clip_image004[8]" border="0" title="clip_image004[8]" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">All your actual monitoring should be targeted at the real class not the seed class.<span style="mso-spacerun: yes">&nbsp; </span>This monitoring will only start working after the second discovery has run and discovered the instance with any properties that are required.</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">The artifact of this process is an additional class and an instance of that class on every server the application is discovered on.<span style="mso-spacerun: yes">&nbsp; </span>This is not a major problem but there are a few things you can do to ensure customers are not confused by this:</span></span></p>
<ul>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Ensure the word seed is in the display name for this class</span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;">In the class description explain what it is used for and indicate no monitoring should be targeted at the class</span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Do not ship a view that shows state, alert etc. about this class</span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;">In your MP guide if you have one make sure you detail this class and how it is used</span></span></span></span></span></span></span></span></span></span></div>
</li>
</ul>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">If the application is uninstalled, the behavior of removing instances depends on which discovery runs first after uninstall:</span></span></p>
<ul>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;">If the seed runs first, it will submit an empty snapshot for the seed class and this instance is deleted.<span style="mso-spacerun: yes"> </span>However because the real instance has this seed instance as a source, SCOM will also remove it at the same time since its discovery source no longer exists.<span style="mso-spacerun: yes"> </span>Both instances in the example above are removed effectively at the same time</span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-size: xx-small;">&nbsp;</span><span style="font-family: Calibri;"><span style="font-size: 11pt;">If the second discovery runs first then this will submit an empty discovery for the real class and this instance will be removed.<span style="mso-spacerun: yes"> </span>The seed instance still exists and this will only be removed on the next schedule of the seed discovery so it is a two stage process</span></span></span></span></span></span></div>
</li>
</ul>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">You could definitely consider the seed based discovery for scripts but you might want to consider for WMI based discoveries as well if the WMI queries you are using are complex and may return many objects.<span style="mso-spacerun: yes">&nbsp; </span>If you absolutely cannot avoid using a script as there is no reliable way of detecting the application through the registry you should write your script that it exits at the earliest opportunity once it determines the application is not installed.</span><span style="color: "></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">There is one alternative approach that sometimes people consider.<span style="mso-spacerun: yes">&nbsp; </span>You could have a single class that is partially discovered by multiple discoveries:</span></span></p>
<ul>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Discovery 1 is really the seed discovery and discovers existence of the application but does not populate all properties</span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Discovery 2 runs a script and discovers all the missing properties and any other classes it needs to for the application</span></span></span></span></span></span></div>
</li>
</ul>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">This is illustrated below.<span style="mso-spacerun: yes">&nbsp; </span>In this example Application X has 4 properties.<span style="mso-spacerun: yes">&nbsp; </span>Two are discovered by the base discovery which is a registry discovery.<span style="mso-spacerun: yes">&nbsp; </span>Two are discovered by the full discovery which runs after the instance is created.</span></span></p>
<p class="MsoNormal" align="center"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/2022.clip_image0068_1F4B063E.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/2022.clip_5F00_image0068_5F00_1F4B063E.png"><img height="371" width="609" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/metablogapi/5658.clip_image0068_thumb_2D1D4C39.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46-metablogapi/5658.clip_5F00_image0068_5F00_thumb_5F00_2D1D4C39.png" alt="clip_image006[8]" border="0" title="clip_image006[8]" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;">This would be built with a single class:</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="color: #0000ff;">&lt;ClassType ID="AuthorMPs.Demo.ApplicationX" Abstract="false" Accessibility="Internal" Hosted="true" Base="Windows!Microsoft.Windows.LocalApplication"/&gt;</span></span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">The first discovery targets Windows Server:</span></span></p>
<p class="MsoNormal"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="color: #0000ff;">&lt;Discovery ID="AuthorMPs.Demo.ApplicationX.BaseDiscovery" Target="Windows!Microsoft.Windows.Server.Computer" Remotable="false" Enabled="true"&gt;<br />&nbsp; &lt;!--Registry based discovery Logic in here--&gt;<br />&lt;/Discovery&gt;</span></span></span></p>
<p class="MsoNormal"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">The second discovery targets the Application X class and discovers the additional properties:</span></span></span></p>
<p class="MsoNormal"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="color: #0000ff;">&lt;Discovery ID="AuthorMPs.Demo.ApplicationX.FullDiscovery" Target="AuthorMPs.Demo.ApplicationX" Remotable="false" Enabled="true"&gt;<br />&nbsp; &lt;!--Script based discovery Logic in here--&gt;<br />&lt;/Discovery&gt;</span></span></span></span></p>
<p class="MsoNormal"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">In theory this works OK but there are some problems:</span></span></span></p>
<ul>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Monitoring may start to run before the second discovery completes.<span style="mso-spacerun: yes"> </span>If this monitoring uses properties P3 and P4 in this example it will fail since these are not discovered yet.</span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">If the second discovery fails for some reason which is more likely in a script that a simple registry discovery, you are in a half discovered state and again monitoring may fail as above</span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">There is some caching behavior that can cause a transient issue:</span></span></span></span></span></span></div>
<ul>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Application Y is discovered by the seed and P1, P2 are populated</span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Second discovery runs and P3, P4 are discovered</span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Now Application Y is uninstalled and the object is removed as expected</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Application Y is reinstalled</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Application Y is discovered by the seed and P1, P2 are populated again</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">P3 and P4 are set to the previous value discovered in the last run.<span style="mso-spacerun: yes"> </span>These will be correctly discovered in the next run of the full discovery but you can end up with a transient issue here</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
</ul>
</li>
</ul>
<p class="MsoNormal"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">The caching problem above is due to the fact there was valid data still available for the second discovery.<span style="mso-spacerun: yes">&nbsp; </span>As soon as the instance came back this data was still there and will remain till a new discovery runs.<span style="mso-spacerun: yes">&nbsp; </span>If you want to see this happening for yourself in the sample MP follow these steps:</span></span></span>&nbsp;</p>
<ul>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">The Application Y full discovery adds a property to the instance of the number of sub folders on the C:\ folder.</span><span style="mso-spacerun: yes"><span style="font-size: 11pt;"> </span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Get it discovered by adding the appropriate registry key &ndash; check the count gets added</span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Now rename the registry key so App Y gets undiscovered.</span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Add a folder to C:\</span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Disable the full discovery to make sure it does not run again (leave the seed enable)</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Rename the registry key back to App Y gets discovered</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Observe that the old value initially for the directory count appears even though the discovery was disabled</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">Enable the discovery again</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">You should see the new value added</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">If you can&rsquo;t see this try disabling the second discovery before you rename the registry key back so it never runs again and you will see we have kept the old data of the property values.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></div>
</li>
</ul>
<p class="MsoNormal"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">I have attached an MP showing both concepts.<span style="mso-spacerun: yes">&nbsp; </span>Application X shows the seed concept and Application Y shows the multiple discovery concept not using a seed:</span></span></span></p>
<ul>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">For Application X discovery, add a registry key HKLM\Software\AuthorMPs\ApplicationX and a string value HKLM\Software\AuthorMps\ApplicationX\Version and set it to something.</span></span></span></span></span></span></span></div>
</li>
<li>
<div class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="mso-spacerun: yes"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">For Application Y discovery, add a registry key HKLM\Software\AuthorMPs\ApplicationY and a string value HKLM\Software\AuthorMps\ApplicationY\Version and set it to something.</span></span></span></span></span></span></span></span></span></span></div>
</li>
</ul>
<p class="MsoNormal"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">So bottom line, while the second method reduces the number of classes and means there are no seed instances, in practice it is much preferable to use the first method for your discovery when you are using scripts to avoid transient issues.</span></span></span></p>
<p class="MsoNormal"><b style="mso-bidi-font-weight: normal"><span style="background: none transparent scroll repeat 0% 0%; mso-highlight: white"><span style="font-family: Calibri;"><span style="font-size: 11pt;">&nbsp;</span></span></span></b></p>
</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/8746/00/00/03/39/02/35/AuthorMPs.Demo.SeedDiscovery.xml" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-8746-00-00-03-39-02-35/AuthorMPs.Demo.SeedDiscovery.xml">AuthorMPs.Demo.SeedDiscovery.xml</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Management Pack Schema</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/management-pack-schema</link>
      <pubDate>Thu, 24 Feb 2011 18:24:00 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/02/24/management-pack-schema/</guid>
      <description><![CDATA[As I was moving content over from the old authormps, I was reviewing all the old schema...]]></description>
      <content:encoded><![CDATA[<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/8802.schemaoverview.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/8802.schemaoverview.png" border="0" /></p>
<p>As I was moving content over from the old authormps, I was reviewing all the old schema documentation I had up there. This is really duplicated by the MSDN documentation which came after I started the site. As a result rather than porting this over I am just going to point to MSDN instead. If there is anything not here then use the feedback comments on the MSDN site and it will get routed to the writers or post a comment to the news groups. </p>
<p>You can find the schema documented here:</p>
<p><a href="https://msdn.microsoft.com/en-us/library/ee533489.aspx">https://msdn.microsoft.com/en-us/library/ee533489.aspx</a></p>
<p>If you actually want the schema files to author against, you need to download the R2 authoring resource kit.&nbsp; After you install this you will find the files in the &ldquo;MP Schema&rdquo; directory of your install.&nbsp; You can get the resource kit here:</p>
<p><a href="https://www.microsoft.com/downloads/en/details.aspx?FamilyID=9104af8b-ff87-45a1-81cd-b73e6f6b51f0&amp;displaylang=en" title="https://www.microsoft.com/downloads/en/details.aspx?FamilyID=9104af8b-ff87-45a1-81cd-b73e6f6b51f0&amp;displaylang=en">https://www.microsoft.com/downloads/en/details.aspx?FamilyID=9104af8b-ff87-45a1-81cd-b73e6f6b51f0&amp;displaylang=en</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Workflow Types</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/workflow-types</link>
      <pubDate>Thu, 24 Feb 2011 18:04:00 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/02/24/workflow-types/</guid>
      <description><![CDATA[In MOM 2005 things were fairly straight forward. You had the concept of rules, tasks and responses....]]></description>
      <content:encoded><![CDATA[<p>In MOM 2005 things were fairly straight forward. You had the concept of rules, tasks and responses. That was really it. There were some more advanced type of rules that carried state change information but this was for a small number of advanced MP authors. In Operations Manager 2007 there are a number of distinct types of workflows that are used for different purposes. Some of these are loaded by the health service on the agent or server and are running continuously while others are loaded on-demand as they are required. A management pack may ship one workflow or thousands of workflows. This section gives you the lowdown on the different types of workflow such as a rule or a task.</p>
<p>Every workflow in Operations Manager is targeted at a type of object or a class. The workflow will only be run where an object of this type has been discovered and is being managed by Operations Manager. A separate workflow will execute for every object that is present of this type.</p>
<h4>Rule</h4>
<p>A rule uses data source, condition detection and write action module types in its definition. A rule will be loaded into memory as soon as an object of the type that the rule is targeting is managed by the healthservice. A rule continues to be held in memory waiting for data items to be generated from the specified data source(s). A rule must be formed according to the following flow chart:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/7080.rule.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/7080.rule.png" border="0" /></p>
<p>A rule consists of one-to-many data source modules, zero or one condition detection module and one to many write action modules. If more than one data source module is used, a condition detection module <strong>must</strong> be used and the module type of the condition detection module must accept the same number of inputs as the number of data sources present.</p>
<p>Each module in the workflow is defined to be of a particular module type. The module type defines the behavior of the module and may be a code based implementation or a composite of other module types.</p>
<p>Every rule must end in at least one write action that changes the monitored system state or Operations Manager state e.g. raises an alert, stores data in the database.</p>
<p>A rule is typically used for one of three purposes:</p>
<ul>
<li>
<p>Collect data and store it in the Operations database and/or the data warehouse</p>
</li>
<li>
<p>Generate an alert based on instrumentation observed</p>
</li>
<li>
<p>Run a timed action on a continuous basis e.g. run a script every five minutes</p>
</li>
</ul>
<h4>Discovery</h4>
<p>A discovery is a specialized type of rule. A discovery is used solely for the purpose of inserting discovery data into the Operations Manager database. This discovery data may be object instances and/or relationship instances. The workflow for a discovery consists of a single data source:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/6862.Discovery.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/6862.Discovery.png" border="0" /></p>
<p>No condition detection modules or write action module types are allowed. There is an implicit write action for all discoveries that is handled by Operations Manager internally. This write action inserts the discovery data into the database. Operations Manager also handles discovery data caching internally so data is only sent to the management server and database if it has changed from the last execution of the discovery.</p>
<p>The module type that is used for the data source must output System.DiscoveryData in order to be used in a discovery workflow. If you try to use a module type that does not output this type of data, MP Verify will not pass for you management pack.</p>
<p>A discovery for each instance of the object type that the discovery is targeted at is loaded and held in memory waiting for data items to be generated from the specified data source. </p>
<p>Although a discovery can only contain a single data source module, a data source module type can be composed of other modules. For example a scheduler can be composed with a script probe action into a new data source module type. Many of the out-of-the-box data sources that are defined for discovery purposes are composite module type definitions.</p>
<h4>Task</h4>
<p>A task is a workflow that is not loaded by the health service until it is requested by the user through the Operations Console or some other SDK call. The user executes the task for one or more objects, the agent receives notification from the server to execute the workflow and then output returned to the database. Once the workflow has executed, it is unloaded from memory until it is called again. A task does not have a data source or a condition detection module. It must consist of either a single probe action or a single write action. You should use the correct type of module depending on what your task will do. If it is only reading system state, use a probe action. If it is changing system state in some way, use a write action.</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/5633.TaskProbeAction.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/5633.TaskProbeAction.png" border="0" /></p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/0385.TaskWriteAction.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/0385.TaskWriteAction.png" border="0" /></p>
<p>&nbsp;</p>
<p>You will recall that probe actions and write actions expect some input data. This is provided for a task in the form of a trigger signal by the health service. As a result you should only use a probe action or write action module type in a task when the type expects System.BaseData or trigger only data. For example if your module type is expecting performance data or event data, it is not going to get this data type when it is launched as a task.</p>
<h4>Monitor</h4>
<p>A monitor is used in Operations Manager to determine state of a monitored object. Each monitor is a distinct state machine that has a set number of states. A monitor is in a single state at any one time. Aggregate and dependency monitors are specific types of monitors that derive their state from other monitors only. Although these use workflows internally it is not necessary to understand the internals of these types for this discussion. This section focuses on unit monitors only.</p>
<p>A unit monitor is defined to be or a particular monitor type. The monitor type defines the workflows that the monitor will use. Typically a monitor type has a separate workflow for each state that the monitor type declares. In addition on-demand workflows can be defined for each state as well. Therefore when a monitor is created there can be many monitors running for each instance of the monitor.</p>
<p>For regular detection workflows (normally ongoing operation of a monitor) any number of modules can be used. The rules for the workflow are:</p>
<ul>
<li>
<p>The workflow must begin with one or more data source modules</p>
</li>
<li>
<p>The workflow must not use write action modules</p>
</li>
<li>
<p>The workflow can use condition detection and probe actions modules in any order</p>
</li>
<li>
<p>Only one data stream should be outputted i.e. if you are using two data source modules you must pass the output to a condition detection module</p>
</li>
</ul>
<p>For each health state of the monitor, the workflows should be mutually exclusive i.e. data should only be output for one workflow for a given set of instrumentation. Since a monitor is a state machine it is invalid to output both states at a given time. Therefore when you are using an expression filter in your workflows you should make sure both expression cannot evaluate to true at once.</p>
<p>As an example a two state monitor may define the following workflows for regular detection:</p>
<p>State 1:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/3652.MonitorState1.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/3652.MonitorState1.png" border="0" /></p>
<p>State 2:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/1854.MonitorState2.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/1854.MonitorState2.png" border="0" /></p>
<p>It is possible that one monitor state can declare no workflow for regular detection. This means that this state can only be entered when the user resets the monitor or the monitor is reset by the health service (comes out of maintenance mode or initiates for the first time)</p>
<p>The on-demand workflows for a monitor type define what state will be set when the monitor is reset (by the user, by exiting maintenance mode or on first initialization). These workflows must follow these rules:</p>
<ul>
<li>
<p>The workflow must begin with a probe action</p>
</li>
<li>
<p>The initial probe action must be trigger only i.e. it takes no input data</p>
</li>
<li>
<p>The workflow can use condition detection and probe actions modules in any order</p>
</li>
<li>
<p>No data source or write actions can be used in the workflow</p>
</li>
</ul>
<p>A two state monitor may define the following workflows for on-demand detection:</p>
<p>State 1:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/2870.OnDemandState1.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/2870.OnDemandState1.png" border="0" /></p>
<p>State 2:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/8168.OnDemandState2.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/8168.OnDemandState2.png" border="0" /></p>
<p>As with regular detection you should ensure only one state evaluates at a given time to avoid non deterministic behavior.</p>
<h4>Diagnostic</h4>
<p>A diagnostic is a specialized type of task. A diagnostic uses a monitor state change to trigger execution. It is either executed on demand by the user (or another SDK call) when a monitor is in a given state or automatically by the health service when the state is entered. Diagnostic workflows are targeted to a type of object, a monitor and a specific health state of the monitor. A diagnostic is not loaded by the health service until it is required. </p>
<p>The diagnostic consists of zero or one condition detection modules and one probe action module. A diagnostic should not change system state in any way.</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/1258.Diagnostic.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/1258.Diagnostic.png" border="0" /></p>
<p>The condition detection will often be a filter that looks at the input data item (the state change with the original data item that caused the state change as context) and evaluates it against a filter.</p>
<p>Multiple diagnostics can be created for the same monitor state if required.</p>
<h4>Recovery</h4>
<p>A recovery is another specialized type of task. A recovery uses a monitor state change or diagnostic output to trigger execution. It is either executed on demand by the user (or another SDK call) when a monitor is in a given state or automatically by the health service when the state is entered. Alternatively it may execute only after a specific diagnostic has provided output data. Recovery workflows are either targeted to a type of object, a monitor and a specific health state or they are targeted to a type of object and a specific diagnostic that is targeted to the same type.</p>
<p>The recovery consists of zero or one condition detection modules and one write action module. A recovery changes system state is some way.</p>
<p>The workflow for a recovery triggered by a state change is:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/0121.Recovery1.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/0121.Recovery1.png" border="0" /></p>
<p>The workflow for a recovery triggered by a diagnostic is:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/2703.Recovery2.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/2703.Recovery2.png" border="0" /></p>]]></content:encoded>
    </item>
    <item>
      <title>Module Type Semantics</title>
      <link>https://docs.microsoft.com/archive/blogs/authormps/module-type-semantics</link>
      <pubDate>Thu, 24 Feb 2011 17:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Steve Wilson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/authormps/2011/02/24/module-type-semantics/</guid>
      <description><![CDATA[This is a quick summary of the different module types available in Operations Manager.&nbsp; Again...]]></description>
      <content:encoded><![CDATA[<p>This is a quick summary of the different module types available in Operations Manager.&nbsp; Again nothing new here just cataloging the old content from my site so it is easy to find here.</p>
<p>Operations Manager uses modules to define workflows. Workflows are defined in management packs and distributed to agents and servers via the Operations Manager channel. Workflows can do many things such as collect information and store in the operations database or data warehouse, run timed scripts, create alerts, run on-demand tasks etc. Workflows are defined using modules and modules are defined to be of a particular type known as a module type. A module type can either be a code implementation (native or managed) or a composite of other module types. There are four different module types that can be defined. Each of these has different semantics.</p>
<h4>Data Source</h4>
<p>A data source module type generates data using some form of instrumentation of some timed trigger action. For example a data source may provide events from a specific Windows event log or it could poll Windows performance counters every 10 minutes for a specific performance counter. There are many data sources available in Operations Manager.</p>
<p>A data source takes no input data and provides one output data stream. The module type will normally require some configuration to specify the behavior e.g. computer name and log name in the case of the Windows event log data source. The module can be represented as follows: </p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/3404.DataSource.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/3404.DataSource.png" border="0" /></p>
<h4>Probe Action</h4>
<p>A probe action module type uses some input data to provide some output data and will usually require some configuration to specify the behavior. A probe action will interrogate a monitored entity in some way but it should not affect system state in any way. An example would be running a script that used an application API to generate some data or querying WMI to get some data. Often a probe action will be used in conjunction with a scheduler data source to run some action on a timed basis. The probe action module type may or may not use the input data item to affect the behavior. If the data item is not used the input data should be defined as trigger only. An incoming data item will trigger the probe to execute but the data is not used. Sometimes the data may be used for example if the probe is triggered by a Windows event, it may be required to pass the event ID to the probe action as configuration. A probe action can be represented as:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/4540.ProbeAction.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/4540.ProbeAction.png" border="0" /></p>
<p>A probe action provides a single output data stream.</p>
<p>You should note that Operations Manager cannot determine if the probe action is being used to change system state in some way e.g. if you run a script defined using a probe action module type, you could be changing state in some way in your script. It is up to the MP author to adhere to the module type definition guidance. If you are changing system state you should use a write action module type instead. </p>
<h4>Condition Detection</h4>
<p>A condition detection module type is used to filter the incoming data in some way. There are many types of filter possible e.g. a simple filter on the input data, consolidation of like data items, correlation between multiple inputs, averaging and optimization of performance data etc. A condition detection module type can take one or more input data streams and provides a single output data steam. It can be represented as follows:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/8203.ConditionDetection.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/8203.ConditionDetection.png" border="0" /></p>
<p>Many of the data sources that ship out of the box will already contain an expression filter in their composite definition so it may not be necessary to use a condition detection module in your workflow definitions.</p>
<h4>Write Action</h4>
<p>A write action module type takes a single input data stream and uses this in conjunction with some configuration to affected system state in some way. This change could be in the monitored system or in Operations Manager itself. For example this may be to run a script that changes something, write data into the Operations manager database or generate an alert. A write action can be represented as:</p>
<p style="text-align: center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/46/4010.WriteAction.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-87-46/4010.WriteAction.png" border="0" /></p>
<p>A write action may or may not output data. This data cannot be passed to any other module because the write action is the last module in a workflow. However, the data may be sent to the Operations database. An example is running a command that outputs data to standard out. This data may be useful to the operator that executed the command and is returned to them and stored as task output. </p>]]></content:encoded>
    </item>
  </channel>
</rss>