Saturday, July 2, 2011

SCOM Discovery Managmentpack Example Using No Script

Below is just one example of 21,000 managementpacks written in xml on:

http://www.planetmps.com/


<ManagementPack xsi:noNamespaceSchemaLocation="C:\MPSchema\ManagementPackSchema.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Manifest>
    <Identity>
      <ID>PlanetMPs.Win32_BIOS.Discovery</ID>
      <Version>1.0.0.1</Version>
    </Identity>
    <Name>PlanetMPs Win32_BIOS Discovery</Name>
    <References>
      <Reference Alias="System">
        <ID>System.Library</ID>
        <Version>6.0.6246.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="SystemHealth">
        <ID>System.Health.Library</ID>
        <Version>6.0.6246.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="SystemPerf">
        <ID>System.Performance.Library</ID>
        <Version>6.0.6246.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Windows">
        <ID>Microsoft.Windows.Library</ID>
        <Version>6.0.6246.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="SC">
        <ID>Microsoft.SystemCenter.Library</ID>
        <Version>6.0.6246.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
    </References>
  </Manifest>
  <TypeDefinitions>
    <EntityTypes>
      <ClassTypes>
        <ClassType ID="PlanetMPs.2009.Win32_BIOS" Abstract="false" Accessibility="Internal" Hosted="true" Base="Windows!Microsoft.Windows.LocalApplication">
          <Property ID="BiosCharacteristics" Type="string"/>
          <Property ID="BIOSVersion" Type="string"/>
          <Property ID="BuildNumber" Type="string"/>
          <Property ID="Caption" Type="string"/>
          <Property ID="CodeSet" Type="string"/>
          <Property ID="CurrentLanguage" Type="string"/>
          <Property ID="Description" Type="string"/>
          <Property ID="IdentificationCode" Type="string"/>
          <Property ID="InstallableLanguages" Type="string"/>
          <Property ID="InstallDate" Type="string"/>
          <Property ID="LanguageEdition" Type="string"/>
          <Property ID="ListOfLanguages" Type="string"/>
          <Property ID="Manufacturer" Type="string"/>
          <Property ID="Name" Type="string"/>
          <Property ID="OtherTargetOS" Type="string"/>
          <Property ID="PrimaryBIOS" Type="string"/>
          <Property ID="ReleaseDate" Type="string"/>
          <Property ID="SerialNumber" Type="string"/>
          <Property ID="SMBIOSBIOSVersion" Type="string"/>
          <Property ID="SMBIOSMajorVersion" Type="string"/>
          <Property ID="SMBIOSMinorVersion" Type="string"/>
          <Property ID="SMBIOSPresent" Type="string"/>
          <Property ID="SoftwareElementID" Type="string"/>
          <Property ID="SoftwareElementState" Type="string"/>
          <Property ID="Status" Type="string"/>
          <Property ID="TargetOperatingSystem" Type="string"/>
          <Property ID="Version" Type="string"/>
        </ClassType>
      </ClassTypes>
    </EntityTypes>
  </TypeDefinitions>
  <Monitoring>
    <Discoveries>
      <Discovery ID="PlanetMPs.2009.Win32_BIOS.Discovery" Target="Windows!Microsoft.Windows.Server.Computer" Remotable="false" Enabled="true">
        <Category>Discovery</Category>
        <DiscoveryTypes>
          <DiscoveryClass TypeID="PlanetMPs.2009.Win32_BIOS">
            <Property PropertyID="BiosCharacteristics"/>
            <Property PropertyID="BIOSVersion"/>
            <Property PropertyID="BuildNumber"/>
            <Property PropertyID="Caption"/>
            <Property PropertyID="CodeSet"/>
            <Property PropertyID="CurrentLanguage"/>
            <Property PropertyID="Description"/>
            <Property PropertyID="IdentificationCode"/>
            <Property PropertyID="InstallableLanguages"/>
            <Property PropertyID="InstallDate"/>
            <Property PropertyID="LanguageEdition"/>
            <Property PropertyID="ListOfLanguages"/>
            <Property PropertyID="Manufacturer"/>
            <Property PropertyID="Name"/>
            <Property PropertyID="OtherTargetOS"/>
            <Property PropertyID="PrimaryBIOS"/>
            <Property PropertyID="ReleaseDate"/>
            <Property PropertyID="SerialNumber"/>
            <Property PropertyID="SMBIOSBIOSVersion"/>
            <Property PropertyID="SMBIOSMajorVersion"/>
            <Property PropertyID="SMBIOSMinorVersion"/>
            <Property PropertyID="SMBIOSPresent"/>
            <Property PropertyID="SoftwareElementID"/>
            <Property PropertyID="SoftwareElementState"/>
            <Property PropertyID="Status"/>
            <Property PropertyID="TargetOperatingSystem"/>
            <Property PropertyID="Version"/>
            <Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
          </DiscoveryClass>
        </DiscoveryTypes>
        <DataSource ID="DiscoveryDataSource" RunAs="System!System.PrivilegedMonitoringAccount" TypeID="Windows!Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper">
          <NameSpace>\\$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$\root\CIMV2</NameSpace>
          <Query>SELECT * FROM Win32_BIOS</Query>
          <Frequency>60</Frequency>
          <ClassId>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]$</ClassId>
          <InstanceSettings>
            <Settings>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/BiosCharacteristics$</Name>
                 <Value>$Data/Property[@Name='BiosCharacteristics']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/BIOSVersion$</Name>
                 <Value>$Data/Property[@Name='BIOSVersion']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/BuildNumber$</Name>
                 <Value>$Data/Property[@Name='BuildNumber']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/Caption$</Name>
                 <Value>$Data/Property[@Name='Caption']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/CodeSet$</Name>
                 <Value>$Data/Property[@Name='CodeSet']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/CurrentLanguage$</Name>
                 <Value>$Data/Property[@Name='CurrentLanguage']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/Description$</Name>
                 <Value>$Data/Property[@Name='Description']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/IdentificationCode$</Name>
                 <Value>$Data/Property[@Name='IdentificationCode']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/InstallableLanguages$</Name>
                 <Value>$Data/Property[@Name='InstallableLanguages']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/InstallDate$</Name>
                 <Value>$Data/Property[@Name='InstallDate']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/LanguageEdition$</Name>
                 <Value>$Data/Property[@Name='LanguageEdition']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/ListOfLanguages$</Name>
                 <Value>$Data/Property[@Name='ListOfLanguages']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/Manufacturer$</Name>
                 <Value>$Data/Property[@Name='Manufacturer']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/Name$</Name>
                 <Value>$Data/Property[@Name='Name']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/OtherTargetOS$</Name>
                 <Value>$Data/Property[@Name='OtherTargetOS']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/PrimaryBIOS$</Name>
                 <Value>$Data/Property[@Name='PrimaryBIOS']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/ReleaseDate$</Name>
                 <Value>$Data/Property[@Name='ReleaseDate']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/SerialNumber$</Name>
                 <Value>$Data/Property[@Name='SerialNumber']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/SMBIOSBIOSVersion$</Name>
                 <Value>$Data/Property[@Name='SMBIOSBIOSVersion']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/SMBIOSMajorVersion$</Name>
                 <Value>$Data/Property[@Name='SMBIOSMajorVersion']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/SMBIOSMinorVersion$</Name>
                 <Value>$Data/Property[@Name='SMBIOSMinorVersion']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/SMBIOSPresent$</Name>
                 <Value>$Data/Property[@Name='SMBIOSPresent']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/SoftwareElementID$</Name>
                 <Value>$Data/Property[@Name='SoftwareElementID']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/SoftwareElementState$</Name>
                 <Value>$Data/Property[@Name='SoftwareElementState']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/Status$</Name>
                 <Value>$Data/Property[@Name='Status']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/TargetOperatingSystem$</Name>
                 <Value>$Data/Property[@Name='TargetOperatingSystem']$</Value>
              </Setting>
              <Setting>
                 <Name>$MPElement[Name="PlanetMPs.2009.Win32_BIOS"]/Version$</Name>
                 <Value>$Data/Property[@Name='Version']$</Value>
              </Setting>
            </Settings>
          </InstanceSettings>
          <TimeoutSeconds>20</TimeoutSeconds>
        </DataSource>
      </Discovery>
    </Discoveries>
  </Monitoring>
  <Presentation>
    <Views>
      <View ID="PlanetMPs.Win32_BIOS.Discovery.StateView" TypeID="SC!Microsoft.SystemCenter.StateViewType" Target="PlanetMPs.2009.Win32_BIOS" Visible="true" Accessibility="Internal">
        <Category>Operations</Category>
        <Criteria/>
      </View>
    </Views>
    <Folders>
      <Folder ID="PlanetMPs.Win32_BIOS.Discovery.ViewFolder.Root" ParentFolder="SC!Microsoft.SystemCenter.Monitoring.ViewFolder.Root" Accessibility="Internal"/>
    </Folders>
    <FolderItems>
      <FolderItem ElementID="PlanetMPs.Win32_BIOS.Discovery.StateView" Folder="PlanetMPs.Win32_BIOS.Discovery.ViewFolder.Root"/>
    </FolderItems>
  </Presentation>
  <LanguagePacks>
    <LanguagePack ID="ENU" IsDefault="true">
      <DisplayStrings>
        <!-- MP -->
        <DisplayString ElementID="PlanetMPs.Win32_BIOS.Discovery">
          <Name>PlanetMPs Win32_BIOS Discovery</Name>
          <Description>Discovers Win32_BIOS</Description>
        </DisplayString>
        <!-- Classes -->
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS">
          <Name>Win32_BIOS Discovery</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="BiosCharacteristics">
          <Name>BiosCharacteristics</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="BIOSVersion">
          <Name>BIOSVersion</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="BuildNumber">
          <Name>BuildNumber</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="Caption">
          <Name>Caption</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="CodeSet">
          <Name>CodeSet</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="CurrentLanguage">
          <Name>CurrentLanguage</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="Description">
          <Name>Description</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="IdentificationCode">
          <Name>IdentificationCode</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="InstallableLanguages">
          <Name>InstallableLanguages</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="InstallDate">
          <Name>InstallDate</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="LanguageEdition">
          <Name>LanguageEdition</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="ListOfLanguages">
          <Name>ListOfLanguages</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="Manufacturer">
          <Name>Manufacturer</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="Name">
          <Name>Name</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="OtherTargetOS">
          <Name>OtherTargetOS</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="PrimaryBIOS">
          <Name>PrimaryBIOS</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="ReleaseDate">
          <Name>ReleaseDate</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="SerialNumber">
          <Name>SerialNumber</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="SMBIOSBIOSVersion">
          <Name>SMBIOSBIOSVersion</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="SMBIOSMajorVersion">
          <Name>SMBIOSMajorVersion</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="SMBIOSMinorVersion">
          <Name>SMBIOSMinorVersion</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="SMBIOSPresent">
          <Name>SMBIOSPresent</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="SoftwareElementID">
          <Name>SoftwareElementID</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="SoftwareElementState">
          <Name>SoftwareElementState</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="Status">
          <Name>Status</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="TargetOperatingSystem">
          <Name>TargetOperatingSystem</Name>
        </DisplayString>
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS" SubElementID="Version">
          <Name>Version</Name>
        </DisplayString>
        <!-- Discoveries -->
        <DisplayString ElementID="PlanetMPs.2009.Win32_BIOS.Discovery">
          <Name>Discovers Win32_BIOS</Name>
        </DisplayString>
        <!-- Views -->
        <DisplayString ElementID="PlanetMPs.Win32_BIOS.Discovery.StateView">
          <Name>State</Name>
        </DisplayString>
        <!-- Folders -->
        <DisplayString ElementID="PlanetMPs.Win32_BIOS.Discovery.ViewFolder.Root">
          <Name>Win32_BIOS</Name>
        </DisplayString>
      </DisplayStrings>
    </LanguagePack>
  </LanguagePacks>
</ManagementPack>

No comments:

Post a Comment