As part of creating or modifying a discovery pattern, you can use the Parse file operation to extract information from a file and create variables to contain the extracted information.

Before you begin

Role required: pd_admin

Navigate to the relevant pattern step:

  1. On the pattern form, select the relevant identification section for Discovery.

    Alternatively, select the relevant identification or connection section for Service Mapping.

  2. Select the relevant pattern step or click Add a step button to add a step.

Basic knowledge of programming is desirable.

About this task

Alternatively, you can use traffic-based connections to create a parse file step in the relevant CI pattern as described in Fine-tune patterns using traffic-based discovery.

Procedure

  1. Select Parse file from the Operation list.
  2. Specify the file path in Select file.
    You can use variables. You can also use values from a temporary tabular variable: from a specific field or a specific column in a table sequentially, starting from the first row. For more information, see Enter values and variables in patterns.

    To specify the actual file, click Browse, navigate to the file, and click Select.

    Important: Avoid entering a specific path to a location or file because it can be different on different operating systems. You should use variables for paths.
  3. Select the relevant parsing strategy from the Define Parsing list and define parsing criteria.
  4. Select Terminate to stop discovery if no results are found.
  5. If in Debug mode, test the step by clicking Test and checking that the operation brings the result you expected.
    In Debug mode, if any permission related errors are encountered during the operation, clicking on Test displays the related error message but the Retrieve File Content may still return the file content.

Example

You can use the Parse File operation to extract data on prices and authors from an xml file using the XML File parsing strategy.


Displaying the Advanced Variables pane

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.