Required Management Pack Definitions

適用於: Operations Manager 2007 R2

The following topic describes the management pack root element. It also includes sample code that illustrates the basic framework of a management pack, and a procedure that provides instructions on how to import the sample management pack in to Operations Manager.

Management Pack Root Element

The first line of every management pack is the root element, <ManagementPack>. This element defines the namespaces for the management pack and contains all the sections that are necessary to describe the functionality. For more information about the declarations for a management pack, see the System Center Operations Manager 2007 documentation for ManagementPack Members (https://go.microsoft.com/fwlink/?linkid=150718).

Manifest

The first section within the management pack is called <Manifest>. <Manifest> is the only required section of the management pack and contains three parts: identity, name, and references. Identity and Name make up the unique identifier for the management pack. Notice that the references subsection points to the management packs that are required for this management pack to function correctly.

Microsoft.Unix.Library contains support for UNIX-based and Linux-based servers. The Microsoft.SystemCenter.WSManagement.Library provides support for the Web Service Management standard for remotely exchanging management data with any computer device that implements the protocol. TheMicrosoft Operations Manager 2007 Management Pack Module Reference (https://go.microsoft.com/fwlink/?linkid=150729) provides additional information about these management packs.

This following XML represents the basic starting point for building a management pack.

<ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”>
  <Manifest>
    <Identity>
      <ID>Microsoft.SCX.Authoring.Guide</ID>
      <Version>6.1.7000.001</Version>
    </Identity>
    <Name>Microsoft System Center Cross Platform Management Pack Authoring Guide Sample</Name>
    <References>
      <Reference Alias="SCDW">
        <ID>Microsoft.SystemCenter.DataWarehouse.Library</ID>
        <Version>6.0.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="ReportLibrary">
        <ID>Microsoft.SystemCenter.DataWarehouse.Report.Library</ID>
        <Version>6.0.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="SC">
        <ID>Microsoft.SystemCenter.Library</ID>
        <Version>6.0.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="WSM">
        <ID>Microsoft.SystemCenter.WSManagement.Library</ID>
        <Version>6.0.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Unix">
        <ID>Microsoft.Unix.Library</ID>
        <Version>6.1.7000.256</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Windows">
        <ID>Microsoft.Windows.Library</ID>
        <Version>6.0.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="SystemHealth">
        <ID>System.Health.Library</ID>
        <Version>6.0.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="System">
        <ID>System.Library</ID>
        <Version>6.0.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="SystemPerf">
        <ID>System.Performance.Library</ID>
        <Version>6.0.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
    </References>
  </Manifest>
  <TypeDefinitions/>
  <Monitoring>
          <Discoveries/>
          <Rules/>
          <Tasks/>
          <Monitors/>
          <Recoveries/>
      </Monitoring>
  <Templates/>
  <PresentationTypes/>
  <Presentation/>
  <Reporting/>
  <LanguagePacks/>
</ManagementPack>

Save the full text of this XML example as Microsoft.SCX.Authoring.Guide.xml in an unformatted file by using your editor of choice. Notice that the Identity section’s ID has a value identical to the file name. This name match is required and allows Operations Manager to locate the referenced management pack on the file system. You must change both the file name and the Identity ID when you customize the name of this management pack.

Import the management pack to understand the importing process and to validate that this management pack is correct.

Import a management pack

  1. Start Operations Manager.

  2. From the Administration Node, right-click Management Packs, and then select Import Management Packs. Notice that the Import Management Packs Wizard starts.

  3. Select Add, add from disk.

  4. Select newly created management pack: Microsoft.SCX.Authoring.Guide.xml.

  5. Add to Import List.

  6. Notice the Status details dialog box; it reports whether any previous versions of the management pack are installed. Only later versions of a management pack can be imported.

  7. Select Install; the import process should begin immediately.

  8. When the import is complete, select Close.

For additional instructions about how to import a management pack, see How to Import a Management Pack in Operations Manager 2007 R2 (https://go.microsoft.com/fwlink/?linkid=98348).

Notice that some sections in the code example have been expanded to contain empty subsections. This is to help identify the locations for XML described in later topics. Refer to the sample management pack to confirm correct placement of code examples.

In the references subsection, there are references to common Operations Manager management packs. You will always reference these management packs for any cross-platform monitoring. There are additional management packs available for specific operating systems.

The references of particular note for UNIX-based or Linux-based servers are the reference for the UNIX library and the WSMAN Library:

      <Reference Alias="Unix">
       <ID>Microsoft.Unix.Library</ID> 
        <Version>6.0.6278.0</Version> 
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken> 
      </Reference>

and

      <Reference Alias="WSM">
        <ID>Microsoft.SystemCenter.WSManagement.Library</ID>
        <Version>6.0.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>

The Microsoft.Unix.Library contains generic UNIX and Linux management pack support, including the method ProbeAction. The Microsoft.SystemCenter.WSManagement.Library contains Web services management support to enable communication with the computers within an Operations Manager management group.