As part of creating or modifying a discovery pattern, you can reuse a sequence of discovery steps that you created for one pattern in other patterns. Saved shared step sequences become pattern modules referred to as shared libraries.

Before you begin

Role required: pd_admin

Basic knowledge of programming is desirable.

About this task

You do not have to recreate the same step manually if you reuse existing step sequences.

First, you save the steps you want to reuse into a repository as a shared library. Then you can insert them wherever relevant and as many times as needed.

You can deactivate shared libraries, so that patterns using them, skip steps in deactivated shared libraries. For more information, see Discovery Configuration Console. You can also disable the step containing a shared library for a specific pattern. This change does not affect other patterns containing the same shared library.

If a precondition defined for a shared library step is not fulfilled, the pattern skips all steps belonging to this shared library. For example, if the file, to which the variable points, does not contain "test", the pattern does not run the shared library steps 1-1 to 1-5. The precondition exists only for the pattern within which you created it. The precondition does not affect other patterns using this shared library.

Figure 1. Library Reference operation form

Precondition for a shared library step

Procedure

  1. If the steps you want to reuse already exist, create a reusable step sequence as follows:
    1. Navigate to the pattern containing the steps that you want to reuse.
    2. Navigate to the steps that you want to combine.
    3. Select the steps, right-click, and choose Create shared library.
    4. Fill in the fields as appropriate:
      Field Description
      Shared Library Name Specify a unique name for the library. For example, UNIX-OS for a step sequence used to discover the UNIX operating system.
      Library Description Specify a meaningful description for the library.
    5. Click Create.
      The system saves the selected steps as a shared library in the Discovery Patterns [sa_pattern] table.
  2. Reuse the step sequence you created:
    1. Navigate to the pattern in which you want to insert your step sequence.
    2. Select the relevant identification section or connectivity section.
    3. Select Library Reference from the Operation list in one of the following locations:
      • the Identification Sections or Connectivity Sections for Service Mapping
      • the Step window for Discovery
    4. Select the required shared library from the Library list.
      The library is inserted as substeps inside an untitled step.
      Inserted shared library appears as a new step with the special icon.
    5. Rename Untitled Step to reflect the purpose of the step.
  3. If in Debug mode, test the step by clicking Test and checking that the operation brings the result you expected.
  4. To exclude the shared library from the pattern without deleting it, clear the Active check box.
    The MID Server skips the step containing the shared library while running the pattern.

What to do next

cmdb-key-value
Discovery also collects cloud tags that are specific to each virtual machine (VM) and saves them to the Key Value [cmdb_key_value] table.