As part of creating or modifying a discovery pattern, you can use the Relation and/or Reference condition to create relationships and references between CIs and their related items. This operation is relevant for both infrastructure and application patterns that Discovery uses for horizontal discovery.

Before you begin

Role required: pd_admin

Decide on the nature of relationship or reference that you are going to create.

The CI relationship you define in the pattern must comply with the model you have created. Find out the existing relationships of the CI type for which you want to create a relationship or a reference:
  1. Check if the CI type is dependent by performing the following steps:
    1. Navigate to CI Class Manager and click Open Hierarchy.
    2. Find the CI type in the hierarchy.
    3. Click Identification Rule on the left of the CI Class form.
    4. Check if the CI type is dependent or independent.
      Figure 1. Example of a dependent rule for Load Balancer Pool Member

      Checking identification rules in CI Class Manager
  2. If the CI is dependent, click Dependent Relationships and check the dependent relationship rules.

    These rules define dependency structure of the CI types and the relationship types. For example, you can discover a load balancer pool with pool members belonging to it. To correctly reflect the type of relationship between these two CIs, create a containment rule, which defines the load balancer pool as the owner of pool members: Owns::Owned by. Refer to Dependent relationship rules to learn more.

    For independent CI types without dependent relationship rules defined for them, you can define any relationship.


    Check dependent relationships for CI classes
  3. (Optional for application patterns used for horizontal discovery) Correctly define operations preceding the Create Relationship/Reference operation in the pattern. These operations must discover CIs for which you want to create a relationship or a reference. Use standard parsing operations to enter discovered CI data as temporary variables in the tabular format.

  4. (Optional for creating a reference) Navigate to the relevant table definitions for the parent and the child CIs and choose the field to use as a reference field.

  5. Navigate to the relevant pattern step:

    1. On the pattern form, select the relevant identification section.
    2. Select the relevant step or create a pattern step by clicking The Add a step button.

Basic knowledge of programming is desirable.

About this task

Discovery uses some patterns to discover a CI with all its related CIs and non-CIs: Items that do not extend the Configuration Item [cmdb_ci] table.

CIs can have different relationships. Dependent relationship rules describe relationships between CIs. The identification engine uses these rules to identify CIs and determine if a specific CI exists in the CMDB or must be added to the CMDB.

If there is a relationship, the system uses the parent and child CI tables and creates a third table with data on the relationship between the parent and child CIs.

In addition to a relationship between CIs, you can create a reference connection between them. If a reference exists, then information about referenced child CIs appears at the bottom of the parent CI form. For example, all load balancer pool members appear on the form of the load balancer pool, which owns these members.

Figure 2. Referenced load balancer services appear on a load balancer form

Referenced load balancer services appear on a load balancer form

Procedure

  1. Discover related items together with the main CI to be able to view and use attributes of related CI types.
  2. Select Create Relation/Reference from the Operation list.
  3. Add the related CI type to this pattern as described in Discover related items together with the main CI.
  4. Complete the form using the fields in the table.
  5. If you selected Condition from Creation Criteria, define this condition:
    1. In the first condition field, enter the required value.
    2. In the first condition field, enter the required value.
      For example, enter the actual string or a variable name.

      Define precondition criteria.
    3. Select an operator from the list.
      If you select Is Empty, the second field disappears.
    4. To add more conditions, click the plus icon and define the criteria.
    5. If you create multiple conditions, define if this pattern must meet all or any of them: From the Meet list, select All or Any.

Example

Use the Create Relation/Reference operation to create the Owns::Owned by relation between a load balancer pool and a load balancer pool member. You also create a reference from a load balancer pool member to the load balancer pool.
Using Relation/Reference operation to create relation between a load balancer pool and a load balancer pool member.
Another example is using the Create Relation/Reference operation to create the Provides::Provided by relation between a storage device and a file system. This operation also creates a reference from the storage device to the load system.
Using Relation/Reference operation to create relation between a storage device and a file system.
Another example is using the Create Relation/Reference operation to create the reference between a disk partition and a iSCSI disk.
Using the Create Relation/Reference operation to create the reference between a disk partition and a iSCSI disk.
The following example shows how to add a non-CI item (a switch port [dscy_switchport]) to a CI (switch [cmdb_ci_ip_switch]).
A related non-CI item: switch port
You can also use the Create Relation/Reference operation to create the relation of the “Managed by::Manages” type between Oracle Golden Gate and Golden Gate Replica. In this case, you do not need to use the Reference properties.
Creating a relationship between two CIs.

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.