As part of creating or modifying a discovery pattern, you can use the Parse URL operation to break down a URL to the component level.

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

The URL parsing breaks a URL into the following components: protocol, hostname or IP, port, path and file.

Procedure

  1. On the Identification or Connectivity Sections form, select Parse URL from the Operation list.
  2. Fill in the fields, as appropriate.
    Field Description
    Source Specify the URL:
    • Enter a value that can change, a variable. Type the dollar character ($) and the first letters of the variable name. For example, $ldap_url.
    • Specify complex (concatenated) values in fields. Enter a value, then add a plus sign (+), and then enter another value. For example, $install_directory+"conf/httpd.conf".
    • Enter constant values, a string. For example, "/opt/ibm/mqsi/7.0/bin/".
    • Enter a value from a 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.
    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.
    Target Specify the table to hold the results. Use variables, complex values or strings as described above.
  3. Select Terminate to stop discovery if no results are found.
  4. If in Debug mode, test the step by clicking Test and checking that the operation brings the result you expected.

Example

To break an LDAP directory URL to components and save the results in a new table, use the Parse URL operation as follows:


Defining the Parse URL operation

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.