1

I am learning to use SCOM in order to develop a SCOM pack. The only usable tool I have found (yet) to develop a pack is Visio (with the management pack designer).

I managed to create a pack that monitors a specific service, and now I want to create a pack that monitors a role. Visio requires me to enter either the role id, HKLM key, HKLM value or WMI query to find the service. What I want to do is monitor the IIS server role. I found the role id of IIS (2), but I couldn't export the pack, some problem with visio. So now I want to try with HKLM - but how do I find the key/value for IIS?

Or am I in a completely wrong path?

vainolo
  • 170
  • 7

2 Answers2

0

I found your question because I had a similar problem.

In the end, I changed the discovery in Visio to use a registry key, generated the MP, and then edited the resulting XML to remove the registry-based discovery and replace it with a WMI query.

I my case, I wanted to discover the Print Server role (ID=135), so the discovery I used was this:

  <Discovery ID="My.Management.Pack.Discovery.Print.Server.Seed" Enabled="true" Target="Windows!Microsoft.Windows.Server.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal">
    <Category>Discovery</Category>
    <DiscoveryTypes>
      <DiscoveryClass TypeID="My.Management.Pack.Class.Print.Server.Seed">
        <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
      </DiscoveryClass>
      <DiscoveryRelationship TypeID="Windows!Microsoft.Windows.ComputerHostsLocalApplication" />
    </DiscoveryTypes>

    <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper">
      <NameSpace>\\$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\ROOT\CIMV2</NameSpace>
      <Query>
        SELECT Name FROM Win32_ServerFeature WHERE ID=135
      </Query>
      <Frequency>14400</Frequency>
      <ClassId>$MPElement[Name="My.Management.Pack.Class.Print.Server.Seed"]$</ClassId>
      <InstanceSettings>
        <Settings>
          <Setting>
            <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
            <Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
          </Setting>
          <Setting>
            <Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
            <Value>Print Server Seed</Value>
          </Setting>
        </Settings>
      </InstanceSettings>
    </DataSource>
  </Discovery>
paulf
  • 16
  • 1
  • Exactly what I did. After fighting with Visio and seeing that the code that was generated, I stopped using it and used the MP Authoring tool. The resulting XML is clean, easy to understand and usable. – vainolo Jun 24 '13 at 07:57
0

check this link out as well for role id's

http://msdn.microsoft.com/en-us/library/cc280268(v=vs.85).aspx

  • 1
    Welcome to Server Fault. While this might technically answer the question it is much more helpful to include highlights from links. Links tend to break over time (even from MS). – squillman Oct 29 '13 at 01:41