如何建立用於覆寫的管理組件How to create a management pack for overrides

重要

已不再支援此版本的 Operations Manager,建議升級至 Operations Manager 2019This version of Operations Manager has reached the end of support, we recommend you to upgrade to Operations Manager 2019.

在 System Center - Operations Manager 的許多精靈和對話方塊中,您都可以選取用來儲存設定的目的地管理組件。In System Center - Operations Manager, in a number of wizards and dialog boxes, you select a destination management pack in which to store the settings. 您可以選取管理群組中的任何未密封管理組件檔案或建立一個新檔案。You can select any unsealed management pack file in your management group or create a new one.

管理組件可能是密封或未密封的。Management packs can be sealed or unsealed. 密封管理組件無法直接進行修改。A sealed management pack cannot be modified directly. 針對密封管理組件中的工作流程進行的任何變更,例如監視的覆寫,都必須儲存到未密封的管理組件。Any changes to the workflows in the sealed management pack, such as an override for a monitor, must be saved to an unsealed management pack. 未密封的管理組件會參照其所修改的密封管理組件。The unsealed management pack references the sealed management pack that it modifies.

注意

使用 Operations Manager 2019 UR2,您可以追蹤在管理組件中完成的變更。With Operations Manager 2019 UR2, you can track the changes done in management packs. 深入了解Learn more.

下圖顯示隨 Operations Manager 安裝的未密封管理組件。The following illustration shows the unsealed management packs that are installed with Operations Manager.

用來選取管理組件的下拉式功能表

請勿使用隨 Operations Manager 安裝的管理組件儲存您變更的任何設定或您建立的任何元素。Never use the management packs that are installed with Operations Manager to save any settings that you change or elements that you create. 當您必須選取目的地管理組件時,請務必選取您所建立的管理組件。When you have to select a destination management pack, always select a management pack that you create.

當您建立覆寫或停用規則、監視或物件探索時,需要選取目的地管理組件。You select a destination management pack when you create an override or disable a rule, monitor, or object discovery. 當您建立或設定下列元素時,也需要選取目的地管理組件:You also select a destination management pack when you create or configure the following elements:

  • [監視] **** 工作區中的資料夾A folder in the Monitoring workspace

  • 單位、彙總或相依性監視A unit, aggregate, or dependency monitor

  • 屬性An attribute

  • 群組A group

  • 規則A rule

  • 工作A task

  • 執行身分設定檔A Run As profile

  • 使用管理組件範本進行監視Monitoring by using a management pack template

  • 監視分散式應用程式Monitoring of a distributed application

  • 追蹤服務等級目標Tracking of service level objectives

儲存覆寫Saving overrides

若要採用最佳作法,請將每個密封管理組件的所有覆寫儲存到名為 ManagementPack_Override 的未密封管理組件,其中 ManagementPack 是覆寫適用的密封管理組件名稱。As a best practice, save all overrides for each sealed management pack to an unsealed management pack that is named ManagementPack_Override, where ManagementPack is the name of the sealed management pack to which the overrides apply. 例如,管理組件 Microsoft.SQLServer.2012.Monitoring.mp 的覆寫會儲存到 Microsoft.SQLServer.2012.Monitoring_Overrides.xml。For example, overrides to the management pack Microsoft.SQLServer.2012.Monitoring.mp would be saved to Microsoft.SQLServer.2012.Monitoring_Overrides.xml.

當您想要移除密封管理組件時,必須先移除參照它的其他任何管理組件。When you want to remove a sealed management pack, you must first remove any other management packs that reference it. 如果參照密封管理組件的未密封管理組件同時包含套用到不同密封管理組件的覆寫或元素,則移除未密封管理組件時,您將會遺失這些覆寫和元素。If the unsealed management packs that reference the sealed management pack also contain overrides or elements that apply to a different sealed management pack, you lose those overrides and elements when you remove the unsealed management pack.

在下圖中,管理組件 1、2 和 3 的覆寫全都儲存到單一未密封的管理組件中。In the following image, overrides for management packs 1, 2, and 3 are all saved to a single unsealed management pack. 如果您想要移除管理組件 1,就必須先移除該未密封管理組件。If you want to remove management pack 1, you first must remove the unsealed management pack. 如圖中所示,您也會移除管理組件 2 和 3 的所有覆寫。As you can see, you would also remove all overrides for management packs 2 and 3.

儲存成單一管理組件的覆寫

建議的方法是針對您要覆寫的每個密封管理組件建立一個未密封管理組件,如下圖所示。The recommended method is to create an unsealed management pack for each sealed management pack that you want to override, as shown in the following image. 這樣一來,移除管理組件 1 及其未密封的管理組件時,就不會影響其他管理組件。Removing management pack 1 and its unsealed management pack does not affect the other management packs.

將覆寫儲存成個別的管理組件

如何建立用於覆寫的管理組件How to create a management pack for overrides

您可以在設定覆寫之前建立用於覆寫的管理組件,或是在覆寫程序中一併建立。You can create a management pack for overrides before you configure an override or as part of the override procedure.

若要建立管理組件To create a management pack

  • 在 [系統管理] 工作區的瀏覽窗格中,按一下滑鼠右鍵,然後按一下 [建立管理組件]。In the Administration workspace, in the navigation pane, right-click, and then click Create Management Pack.

    -or--or-

  • 在規則或監視之 [覆寫內容] **** 對話方塊的 [選取目的地管理組件] **** 區段中,按一下 [新增] ****。In the Override Properties dialog box for a rule or monitor, in the Select destination management pack section, click New.

後續步驟Next steps