locked
Custom MP no servers show up RRS feed

  • Question

  • I created a simple MP to monitor one of our applications.  I used Visio to create the MP and imported into SCOM 2012.  Everything loads in fine, but no servers show up on the state chart.  I'm pulling it from the registry and it doesn't appear to be find any of the servers. Here is part of the XML.

        <RegistryAttributeDefinition>
                  <AttributeName>Exist</AttributeName>
                  <Path>SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\MailService</Path>
                  <PathType>1</PathType>
                  <AttributeType>0</AttributeType>
                </RegistryAttributeDefinition>

    Monday, July 1, 2013 7:45 PM

All replies

  • It's a 32 bit OS, so there is no WOW64 directory to worry about.
    Monday, July 1, 2013 7:53 PM
  • if service model is ok.

    like

    • you derived class from hosted one e.g LocalApp or ServerRole or just from WindowsCompter
    • you targeted your discovery to correct class

    then it could be related for instance to discovery interval. E.g. it is set to 1 day and you also setup SynInterval.

    to many ifs...

    if you post you full MP, community will be able to help for sure.

    Monday, July 1, 2013 8:15 PM
  • <ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>SolidWorks.Enterprise.PDM</ID>
          <Version>1.2.1.5</Version>
        </Identity>
        <Name>Enterprise PDM </Name>
        <References>
          <Reference Alias="DataWarehouse">
            <ID>Microsoft.SystemCenter.DataWarehouse.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Report">
            <ID>Microsoft.SystemCenter.DataWarehouse.Report.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="SystemCenter">
            <ID>Microsoft.SystemCenter.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="ServiceDesigner">
            <ID>Microsoft.SystemCenter.ServiceDesigner.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Web">
            <ID>Microsoft.SystemCenter.WebApplication.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Windows">
            <ID>Microsoft.Windows.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Health">
            <ID>System.Health.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="System">
            <ID>System.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Performance">
            <ID>System.Performance.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <TypeDefinitions>
        <EntityTypes>
          <ClassTypes>
            <ClassType ID="SolidWorks.Enterprise.PDM.Class.Archive.Vault" Accessibility="Public" Abstract="false" Base="Windows!Microsoft.Windows.ComputerRole" Hosted="true" Singleton="false" />
            <ClassType ID="SolidWorks.Enterprise.PDM.Class.Archive.Vault.Seed" Accessibility="Public" Abstract="false" Base="Windows!Microsoft.Windows.LocalApplication" Hosted="true" Singleton="false" />
            <ClassType ID="SolidWorks.Enterprise.PDM.Class.Database.Monitor.Perspective" Accessibility="Public" Abstract="false" Base="System!System.Perspective" Hosted="true" Singleton="false">
              <Property ID="sysTarget" Type="string" Key="false" CaseSensitive="false" Length="256" MinLength="0" />
            </ClassType>
            <ClassType ID="SolidWorks.Enterprise.PDM.Class.Database.Server" Accessibility="Public" Abstract="false" Base="Windows!Microsoft.Windows.ComputerRole" Hosted="true" Singleton="false" />
            <ClassType ID="SolidWorks.Enterprise.PDM.Class.Database.Server.Seed" Accessibility="Public" Abstract="false" Base="Windows!Microsoft.Windows.LocalApplication" Hosted="true" Singleton="false" />
            <ClassType ID="SolidWorks.Enterprise.PDM.Class.EPDM" Accessibility="Public" Abstract="false" Base="System!System.Service" Hosted="false" Singleton="false">
              <Property ID="ApplicationName" Type="string" Key="true" CaseSensitive="false" Length="256" MinLength="0" />
            </ClassType>
          </ClassTypes>
          <RelationshipTypes>
            <RelationshipType ID="Database.Server.Hosts.Database.Monitor.Perspective" Accessibility="Public" Abstract="false" Base="System!System.Hosting">
              <Source>SolidWorks.Enterprise.PDM.Class.Database.Server</Source>
              <Target>SolidWorks.Enterprise.PDM.Class.Database.Monitor.Perspective</Target>
            </RelationshipType>
            <RelationshipType ID="EPDM.Contains.Archive.Vault" Accessibility="Public" Abstract="false" Base="System!System.Containment">
              <Source>SolidWorks.Enterprise.PDM.Class.EPDM</Source>
              <Target>SolidWorks.Enterprise.PDM.Class.Archive.Vault</Target>
            </RelationshipType>
            <RelationshipType ID="EPDM.Contains.Database.Server" Accessibility="Public" Abstract="false" Base="System!System.Containment">
              <Source>SolidWorks.Enterprise.PDM.Class.EPDM</Source>
              <Target>SolidWorks.Enterprise.PDM.Class.Database.Server</Target>
            </RelationshipType>
          </RelationshipTypes>
        </EntityTypes>
        <SecureReferences>
          <SecureReference ID="OleDbDataSource.MonitoringAccount" Accessibility="Public" Context="System!System.Entity" />
        </SecureReferences>
        <ModuleTypes>
          <DataSourceModuleType ID="OleDbDataSource" Accessibility="Public" RunAs="OleDbDataSource.MonitoringAccount" Batching="false">
            <Configuration>
              <xsd:element minOccurs="1" name="Interval" type="xsd:integer" />
              <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" />
            </Configuration>
            <OverrideableParameters>
              <OverrideableParameter ID="ConnectionString" Selector="$Config/ConnectionString$" ParameterType="string" />
              <OverrideableParameter ID="Interval" Selector="$Config/Interval$" ParameterType="int" />
            </OverrideableParameters>
            <ModuleImplementation Isolation="Any">
              <Composite>
                <MemberModules>
                  <DataSource ID="Scheduler" TypeID="System!System.Scheduler">
                    <Scheduler>
                      <SimpleReccuringSchedule>
                        <Interval Unit="Seconds">$Config/Interval$</Interval>
                      </SimpleReccuringSchedule>
                      <ExcludeDates />
                    </Scheduler>
                  </DataSource>
                  <ProbeAction ID="OleDbProbe" TypeID="System!System.OleDbProbe">
                    <ConnectionString>$Config/ConnectionString$</ConnectionString>
                    <Query />
                    <GetValue>false</GetValue>
                    <QueryTimeout>0</QueryTimeout>
                    <GetFetchTime>true</GetFetchTime>
                  </ProbeAction>
                </MemberModules>
                <Composition>
                  <Node ID="OleDbProbe">
                    <Node ID="Scheduler" />
                  </Node>
                </Composition>
              </Composite>
            </ModuleImplementation>
            <OutputType>System!System.OleDbData</OutputType>
          </DataSourceModuleType>
          <DataSourceModuleType ID="SolidWorks.Enterprise.PDM.DataBase.DiscoveryProvider" Accessibility="Public" Batching="false">
            <Configuration>
              <xsd:element minOccurs="1" name="Computer" type="xsd:string" />
              <xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" />
              <xsd:element minOccurs="1" name="ScriptBody" type="xsd:string" />
              <xsd:element minOccurs="1" name="TargetString" type="xsd:string" />
              <xsd:element minOccurs="1" name="TimeoutSeconds" type="xsd:integer" />
            </Configuration>
            <OverrideableParameters>
              <OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int" />
              <OverrideableParameter ID="TargetString" Selector="$Config/TargetString$" ParameterType="string" />
              <OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int" />
            </OverrideableParameters>
            <ModuleImplementation Isolation="Any">
              <Composite>
                <MemberModules>
                  <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
                    <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
                    <SyncTime />
                    <ScriptName>PerspectiveDiscoveryScript.vbs</ScriptName>
                    <Arguments>"$Config/Computer$" "$Config/TargetString$"</Arguments>
                    <ScriptBody>$Config/ScriptBody$</ScriptBody>
                    <TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
                  </DataSource>
                </MemberModules>
                <Composition>
                  <Node ID="DS" />
                </Composition>
              </Composite>
            </ModuleImplementation>
            <OutputType>System!System.Discovery.Data</OutputType>
          </DataSourceModuleType>
        </ModuleTypes>
        <MonitorTypes>
          <UnitMonitorType ID="Consecutive" Accessibility="Public">
            <MonitorTypeStates>
              <MonitorTypeState ID="ConditionTrue" NoDetection="false" />
              <MonitorTypeState ID="ConditionFalse" NoDetection="false" />
            </MonitorTypeStates>
            <Configuration>
              <xsd:element name="ComputerName" type="xsd:string" minOccurs="0" maxOccurs="1" />
              <xsd:element name="CounterName" type="xsd:string" />
              <xsd:element name="ObjectName" type="xsd:string" />
              <xsd:element name="InstanceName" type="xsd:string" minOccurs="0" maxOccurs="1" />
              <xsd:element name="AllInstances" type="xsd:boolean" minOccurs="0" maxOccurs="1" />
              <xsd:element name="Frequency" type="xsd:unsignedInt" />
              <xsd:element name="ScaleBy" type="xsd:double" minOccurs="0" maxOccurs="1" />
              <xsd:element minOccurs="1" maxOccurs="1" name="Threshold" type="xsd:double" />
              <xsd:element minOccurs="1" maxOccurs="1" name="Direction" type="xsd:string" />
              <xsd:element minOccurs="1" maxOccurs="1" name="NumSamples" type="xsd:unsignedInt" />
            </Configuration>
            <OverrideableParameters>
              <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
              <OverrideableParameter ID="Threshold" Selector="$Config/Threshold$" ParameterType="int" />
            </OverrideableParameters>
            <MonitorImplementation>
              <MemberModules>
                <DataSource ID="DS1" TypeID="Performance!System.Performance.DataProvider">
                  <ComputerName>$Config/ComputerName$</ComputerName>
                  <CounterName>$Config/CounterName$</CounterName>
                  <ObjectName>$Config/ObjectName$</ObjectName>
                  <InstanceName>$Config/InstanceName$</InstanceName>
                  <AllInstances>$Config/AllInstances$</AllInstances>
                  <Frequency>$Config/Frequency$</Frequency>
                  <ScaleBy>$Config/ScaleBy$</ScaleBy>
                </DataSource>
                <ConditionDetection ID="CD1" TypeID="Performance!System.Performance.ConsecutiveSamplesCondition">
                  <Threshold>$Config/Threshold$</Threshold>
                  <Direction>$Config/Direction$</Direction>
                </ConditionDetection>
                <ConditionDetection ID="CDSufficientSamples" TypeID="System!System.LogicalSet.ExpressionFilter">
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="Double">Value</XPathQuery>
                      </ValueExpression>
                      <Operator>GreaterEqual</Operator>
                      <ValueExpression>
                        <Value Type="Double">$Config/NumSamples$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <EmptySet>Passthrough</EmptySet>
                  <SetEvaluation>All</SetEvaluation>
                </ConditionDetection>
                <ConditionDetection ID="CDInSufficientSamples" TypeID="System!System.LogicalSet.ExpressionFilter">
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="Double">Value</XPathQuery>
                      </ValueExpression>
                      <Operator>Less</Operator>
                      <ValueExpression>
                        <Value Type="Double">$Config/NumSamples$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                  <EmptySet>Block</EmptySet>
                  <SetEvaluation>Any</SetEvaluation>
                </ConditionDetection>
              </MemberModules>
              <RegularDetections>
                <RegularDetection MonitorTypeStateID="ConditionTrue">
                  <Node ID="CDSufficientSamples">
                    <Node ID="CD1">
                      <Node ID="DS1" />
                    </Node>
                  </Node>
                </RegularDetection>
                <RegularDetection MonitorTypeStateID="ConditionFalse">
                  <Node ID="CDInSufficientSamples">
                    <Node ID="CD1">
                      <Node ID="DS1" />
                    </Node>
                  </Node>
                </RegularDetection>
              </RegularDetections>
            </MonitorImplementation>
          </UnitMonitorType>
          <UnitMonitorType ID="OleDbConnection" Accessibility="Public">
            <MonitorTypeStates>
              <MonitorTypeState ID="ConnectionFailure" NoDetection="false" />
              <MonitorTypeState ID="NoConnectionFailure" NoDetection="false" />
            </MonitorTypeStates>
            <Configuration>
              <xsd:element minOccurs="1" name="Interval" type="xsd:integer" />
              <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" />
            </Configuration>
            <OverrideableParameters>
              <OverrideableParameter ID="ConnectionString" Selector="$Config/ConnectionString$" ParameterType="string" />
              <OverrideableParameter ID="Interval" Selector="$Config/Interval$" ParameterType="int" />
            </OverrideableParameters>
            <MonitorImplementation>
              <MemberModules>
                <DataSource ID="DataSource" TypeID="OleDbDataSource">
                  <Interval>$Config/Interval$</Interval>
                  <ConnectionString>$Config/ConnectionString$</ConnectionString>
                </DataSource>
                <ConditionDetection ID="CDFailed" TypeID="System!System.ExpressionFilter">
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="Integer">HRResult</XPathQuery>
                      </ValueExpression>
                      <Operator>Less</Operator>
                      <ValueExpression>
                        <Value Type="Integer">0</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                </ConditionDetection>
                <ConditionDetection ID="CDPassed" TypeID="System!System.ExpressionFilter">
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="Integer">HRResult</XPathQuery>
                      </ValueExpression>
                      <Operator>GreaterEqual</Operator>
                      <ValueExpression>
                        <Value Type="Integer">0</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                </ConditionDetection>
              </MemberModules>
              <RegularDetections>
                <RegularDetection MonitorTypeStateID="ConnectionFailure">
                  <Node ID="CDFailed">
                    <Node ID="DataSource" />
                  </Node>
                </RegularDetection>
                <RegularDetection MonitorTypeStateID="NoConnectionFailure">
                  <Node ID="CDPassed">
                    <Node ID="DataSource" />
                  </Node>
                </RegularDetection>
              </RegularDetections>
            </MonitorImplementation>
          </UnitMonitorType>
          <UnitMonitorType ID="OleDbPerformance" Accessibility="Public">
            <MonitorTypeStates>
              <MonitorTypeState ID="OverThreshold" NoDetection="false" />
              <MonitorTypeState ID="UnderThreshold" NoDetection="false" />
            </MonitorTypeStates>
            <Configuration>
              <xsd:element minOccurs="1" name="Interval" type="xsd:integer" />
              <xsd:element minOccurs="1" name="ConnectionString" type="xsd:string" />
              <xsd:element minOccurs="1" name="Threshold" type="xsd:integer" />
            </Configuration>
            <OverrideableParameters>
              <OverrideableParameter ID="ConnectionString" Selector="$Config/ConnectionString$" ParameterType="string" />
              <OverrideableParameter ID="Interval" Selector="$Config/Interval$" ParameterType="int" />
              <OverrideableParameter ID="Threshold" Selector="$Config/Threshold$" ParameterType="int" />
            </OverrideableParameters>
            <MonitorImplementation>
              <MemberModules>
                <DataSource ID="DataSource" TypeID="OleDbDataSource">
                  <Interval>$Config/Interval$</Interval>
                  <ConnectionString>$Config/ConnectionString$</ConnectionString>
                </DataSource>
                <ConditionDetection ID="CDOverThreshold" TypeID="System!System.ExpressionFilter">
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">InitializationTime</XPathQuery>
                      </ValueExpression>
                      <Operator>GreaterEqual</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">$Config/Threshold$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                </ConditionDetection>
                <ConditionDetection ID="CDUnderThreshold" TypeID="System!System.ExpressionFilter">
                  <Expression>
                    <SimpleExpression>
                      <ValueExpression>
                        <XPathQuery Type="UnsignedInteger">InitializationTime</XPathQuery>
                      </ValueExpression>
                      <Operator>Less</Operator>
                      <ValueExpression>
                        <Value Type="UnsignedInteger">$Config/Threshold$</Value>
                      </ValueExpression>
                    </SimpleExpression>
                  </Expression>
                </ConditionDetection>
              </MemberModules>
              <RegularDetections>
                <RegularDetection MonitorTypeStateID="OverThreshold">
                  <Node ID="CDOverThreshold">
                    <Node ID="DataSource" />
                  </Node>
                </RegularDetection>
                <RegularDetection MonitorTypeStateID="UnderThreshold">
                  <Node ID="CDUnderThreshold">
                    <Node ID="DataSource" />
                  </Node>
                </RegularDetection>
              </RegularDetections>
            </MonitorImplementation>
          </UnitMonitorType>
        </MonitorTypes>
      </TypeDefinitions>
      <Monitoring>
        <Discoveries>
          <Discovery ID="SolidWorks.Enterprise.PDM.Discovery.Archive.Vault" Enabled="true" Target="SolidWorks.Enterprise.PDM.Class.Archive.Vault.Seed" ConfirmDelivery="false" Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes>
              <DiscoveryClass TypeID="SolidWorks.Enterprise.PDM.Class.Archive.Vault">
                <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
              </DiscoveryClass>
              <DiscoveryClass TypeID="SolidWorks.Enterprise.PDM.Class.EPDM">
                <Property TypeID="SolidWorks.Enterprise.PDM.Class.EPDM" PropertyID="ApplicationName" />
                <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
              </DiscoveryClass>
              <DiscoveryRelationship TypeID="Windows!Microsoft.Windows.ComputerHostsComputerRole" />
              <DiscoveryRelationship TypeID="EPDM.Contains.Archive.Vault" />
            </DiscoveryTypes>
            <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
              <IntervalSeconds>14400</IntervalSeconds>
              <SyncTime />
              <ScriptName>DiscoveryScript.vbs</ScriptName>
              <Arguments>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Arguments>
              <ScriptBody><![CDATA[
    Option Explicit
    SetLocale("en-us")
    
    Dim oScriptAPI, oDiscoveryData
    
    Set oScriptAPI = CreateObject("MOM.ScriptAPI")
    Set oDiscoveryData = oScriptAPI.CreateDiscoveryData(0, "$MPElement$", "$Target/Id$")
    
    Dim oTarget
    oTarget = WScript.Arguments(0)
    
    Dim oInst0
    Set oInst0 = oDiscoveryData.CreateClassInstance("$MPElement[Name='SolidWorks.Enterprise.PDM.Class.EPDM']$")
    
    Call oInst0.AddProperty("$MPElement[Name='SolidWorks.Enterprise.PDM.Class.EPDM']/ApplicationName$", "EPDM")
    Call oInst0.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "EPDM")
    
    Call oDiscoveryData.AddInstance(oInst0)
    
    Dim oInst1
    Set oInst1 = oDiscoveryData.CreateClassInstance("$MPElement[Name='SolidWorks.Enterprise.PDM.Class.Archive.Vault']$")
    
    Call oInst1.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", oTarget)
    Call oInst1.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Archive Vault (" + oTarget + ")")
    
    Call oDiscoveryData.AddInstance(oInst1)
    
    Dim oRel0
    Set oRel0 = oDiscoveryData.CreateRelationshipInstance("$MPElement[Name='EPDM.Contains.Archive.Vault']$")
    
    oRel0.Source = oInst0
    oRel0.Target = oInst1
    
    Call oDiscoveryData.AddInstance(oRel0)
    
    Call oScriptAPI.Return(oDiscoveryData)
    ]]></ScriptBody>
              <TimeoutSeconds>300</TimeoutSeconds>
            </DataSource>
          </Discovery>
          <Discovery ID="SolidWorks.Enterprise.PDM.Discovery.Archive.Vault.Seed" Enabled="true" Target="Windows!Microsoft.Windows.Server.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes>
              <DiscoveryClass TypeID="SolidWorks.Enterprise.PDM.Class.Archive.Vault.Seed">
                <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
              </DiscoveryClass>
              <DiscoveryRelationship TypeID="Windows!Microsoft.Windows.ComputerHostsLocalApplication" />
            </DiscoveryTypes>
            <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
              <ComputerName>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
              <RegistryAttributeDefinitions>
                <RegistryAttributeDefinition>
                  <AttributeName>Exist</AttributeName>
                  <Path>SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\ArchiveServer</Path>
                  <PathType>1</PathType>
                  <AttributeType>0</AttributeType>
                </RegistryAttributeDefinition>
              </RegistryAttributeDefinitions>
              <Frequency>14400</Frequency>
              <ClassId>$MPElement[Name="SolidWorks.Enterprise.PDM.Class.Archive.Vault.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>Archive Vault Seed</Value>
                  </Setting>
                </Settings>
              </InstanceSettings>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <XPathQuery Type="String">Values/Exist</XPathQuery>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
                    <Value Type="String">True</Value>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
            </DataSource>
          </Discovery>
          <Discovery ID="SolidWorks.Enterprise.PDM.Discovery.Database.Monitor.Perspective" Enabled="true" Target="SolidWorks.Enterprise.PDM.Class.Database.Server" ConfirmDelivery="false" Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes>
              <DiscoveryClass TypeID="SolidWorks.Enterprise.PDM.Class.Database.Monitor.Perspective">
                <Property TypeID="SolidWorks.Enterprise.PDM.Class.Database.Monitor.Perspective" PropertyID="sysTarget" />
                <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
              </DiscoveryClass>
              <DiscoveryRelationship TypeID="Database.Server.Hosts.Database.Monitor.Perspective" />
            </DiscoveryTypes>
            <DataSource ID="DS" TypeID="SolidWorks.Enterprise.PDM.DataBase.DiscoveryProvider">
              <Computer>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Computer>
              <IntervalSeconds>14400</IntervalSeconds>
              <ScriptBody><![CDATA[
    Option Explicit
    SetLocale("en-us")
    
    Dim oScriptAPI, oDiscoveryData
    
    Set oScriptAPI = CreateObject("MOM.ScriptAPI")
    Set oDiscoveryData = oScriptAPI.CreateDiscoveryData(0, "$MPElement$", "$Target/Id$")
    
    Dim oTarget
    oTarget = WScript.Arguments(0)
    
    Dim oConnection
    oConnection = WScript.Arguments(1)
    
    Dim oInst
    Set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='SolidWorks.Enterprise.PDM.Class.Database.Monitor.Perspective']$")
    
    Call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", oTarget)
    Call oInst.AddProperty("$MPElement[Name='SolidWorks.Enterprise.PDM.Class.Database.Monitor.Perspective']/sysTarget$", oConnection)
    Call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Database Monitor Perspective (" + oTarget + ")")
    
    Call oDiscoveryData.AddInstance(oInst)
    
    Call oScriptAPI.Return(oDiscoveryData)
    ]]></ScriptBody>
              <TargetString>Provider=SQLOLEDB;Server=VM2K3S10;Database=Norwood;Integrated Security=SSPI</TargetString>
              <TimeoutSeconds>300</TimeoutSeconds>
            </DataSource>
          </Discovery>
          <Discovery ID="SolidWorks.Enterprise.PDM.Discovery.Database.Server" Enabled="true" Target="SolidWorks.Enterprise.PDM.Class.Database.Server.Seed" ConfirmDelivery="false" Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes>
              <DiscoveryClass TypeID="SolidWorks.Enterprise.PDM.Class.Database.Server">
                <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
              </DiscoveryClass>
              <DiscoveryClass TypeID="SolidWorks.Enterprise.PDM.Class.EPDM">
                <Property TypeID="SolidWorks.Enterprise.PDM.Class.EPDM" PropertyID="ApplicationName" />
                <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
              </DiscoveryClass>
              <DiscoveryRelationship TypeID="Windows!Microsoft.Windows.ComputerHostsComputerRole" />
              <DiscoveryRelationship TypeID="EPDM.Contains.Database.Server" />
            </DiscoveryTypes>
            <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
              <IntervalSeconds>14400</IntervalSeconds>
              <SyncTime />
              <ScriptName>DiscoveryScript.vbs</ScriptName>
              <Arguments>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Arguments>
              <ScriptBody><![CDATA[
    Option Explicit
    SetLocale("en-us")
    
    Dim oScriptAPI, oDiscoveryData
    
    Set oScriptAPI = CreateObject("MOM.ScriptAPI")
    Set oDiscoveryData = oScriptAPI.CreateDiscoveryData(0, "$MPElement$", "$Target/Id$")
    
    Dim oTarget
    oTarget = WScript.Arguments(0)
    
    Dim oInst0
    Set oInst0 = oDiscoveryData.CreateClassInstance("$MPElement[Name='SolidWorks.Enterprise.PDM.Class.EPDM']$")
    
    Call oInst0.AddProperty("$MPElement[Name='SolidWorks.Enterprise.PDM.Class.EPDM']/ApplicationName$", "EPDM")
    Call oInst0.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "EPDM")
    
    Call oDiscoveryData.AddInstance(oInst0)
    
    Dim oInst1
    Set oInst1 = oDiscoveryData.CreateClassInstance("$MPElement[Name='SolidWorks.Enterprise.PDM.Class.Database.Server']$")
    
    Call oInst1.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", oTarget)
    Call oInst1.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Database Server (" + oTarget + ")")
    
    Call oDiscoveryData.AddInstance(oInst1)
    
    Dim oRel0
    Set oRel0 = oDiscoveryData.CreateRelationshipInstance("$MPElement[Name='EPDM.Contains.Database.Server']$")
    
    oRel0.Source = oInst0
    oRel0.Target = oInst1
    
    Call oDiscoveryData.AddInstance(oRel0)
    
    Call oScriptAPI.Return(oDiscoveryData)
    ]]></ScriptBody>
              <TimeoutSeconds>300</TimeoutSeconds>
            </DataSource>
          </Discovery>
          <Discovery ID="SolidWorks.Enterprise.PDM.Discovery.Database.Server.Seed" Enabled="true" Target="Windows!Microsoft.Windows.Server.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes>
              <DiscoveryClass TypeID="SolidWorks.Enterprise.PDM.Class.Database.Server.Seed">
                <Property TypeID="System!System.Entity" PropertyID="DisplayName" />
              </DiscoveryClass>
              <DiscoveryRelationship TypeID="Windows!Microsoft.Windows.ComputerHostsLocalApplication" />
            </DiscoveryTypes>
            <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
              <ComputerName>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
              <RegistryAttributeDefinitions>
                <RegistryAttributeDefinition>
                  <AttributeName>Exist</AttributeName>
                  <Path>SOFTWARE\SolidWorks\Applications\PDMWorks Enterprise\MailService</Path>
                  <PathType>1</PathType>
                  <AttributeType>0</AttributeType>
                </RegistryAttributeDefinition>
              </RegistryAttributeDefinitions>
              <Frequency>14400</Frequency>
              <ClassId>$MPElement[Name="SolidWorks.Enterprise.PDM.Class.Database.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>Database Server Seed</Value>
                  </Setting>
                </Settings>
              </InstanceSettings>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <XPathQuery Type="String">Values/Exist</XPathQuery>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
                    <Value Type="String">True</Value>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
            </DataSource>
          </Discovery>
        </Discoveries>
        <Rules>
          <Rule ID="SolidWorks.Enterprise.PDM.Rule.Archive.Service.Monitor.CPU" Enabled="true" Target="SolidWorks.Enterprise.PDM.Class.Archive.Vault" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
            <Category>PerformanceCollection</Category>
            <DataSources>
              <DataSource ID="DS" TypeID="Performance!System.Performance.OptimizedDataProvider">
                <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
                <CounterName><![CDATA[% Processor Time]]></CounterName>
                <ObjectName>Process</ObjectName>
                <InstanceName>SolidWorks Enterprise PDM Archive Server</InstanceName>
                <AllInstances>false</AllInstances>
                <Frequency>900</Frequency>
                <Tolerance>0</Tolerance>
                <ToleranceType>Absolute</ToleranceType>
                <MaximumSampleSeparation>1</MaximumSampleSeparation>
              </DataSource>
            </DataSources>
            <WriteActions>
              <WriteAction ID="WriteToDB" TypeID="SystemCenter!Microsoft.SystemCenter.CollectPerformanceData" />
            </WriteActions>
          </Rule>
          <Rule ID="SolidWorks.Enterprise.PDM.Rule.Archive.Service.Monitor.Memory" Enabled="true" Target="SolidWorks.Enterprise.PDM.Class.Archive.Vault" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
            <Category>PerformanceCollection</Category>
            <DataSources>
              <DataSource ID="DS" TypeID="Performance!System.Performance.OptimizedDataProvider">
                <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
                <CounterName>Private Bytes</CounterName>
                <ObjectName>Process</ObjectName>
                <InstanceName>SolidWorks Enterprise PDM Archive Server</InstanceName>
                <AllInstances>false</AllInstances>
                <Frequency>900</Frequency>
                <Tolerance>0</Tolerance>
                <ToleranceType>Absolute</ToleranceType>
                <MaximumSampleSeparation>1</MaximumSampleSeparation>
              </DataSource>
            </DataSources>
            <WriteActions>
              <WriteAction ID="WriteToDB" TypeID="SystemCenter!Microsoft.SystemCenter.CollectPerformanceData" />
            </WriteActions>
          </Rule>
          <Rule ID="SolidWorks.Enterprise.PDM.Rule.Database.Service.Monitor.CPU" Enabled="true" Target="SolidWorks.Enterprise.PDM.Class.Database.Server" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
            <Category>PerformanceCollection</Category>
            <DataSources>
              <DataSource ID="DS" TypeID="Performance!System.Performance.OptimizedDataProvider">
                <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
                <CounterName><![CDATA[% Processor Time]]></CounterName>
                <ObjectName>Process</ObjectName>
                <InstanceName>SolidWorks Enterprise PDM Database Server</InstanceName>
                <AllInstances>false</AllInstances>
                <Frequency>900</Frequency>
                <Tolerance>0</Tolerance>
                <ToleranceType>Absolute</ToleranceType>
                <MaximumSampleSeparation>1</MaximumSampleSeparation>
              </DataSource>
            </DataSources>
            <WriteActions>
              <WriteAction ID="WriteToDB" TypeID="SystemCenter!Microsoft.SystemCenter.CollectPerformanceData" />
            </WriteActions>
          </Rule>
    

    Monday, July 1, 2013 8:29 PM
  • how do I post the whole thing?
    Monday, July 1, 2013 8:35 PM