Create a CI identification rule

Identification rules are used to uniquely identify CIs in the CMDB, as part of Identification and Reconciliation (IRE) processes. Each CMDB class can be associated with a single identification rule.

Before you begin

You can update a CI identification rule only at the class level that the rule is defined for. You can't update a derived rule.

Role required: itil has read access, itil_admin (on top of itil) has full access.

About this task

In a CI identification rule, specify a CI identifier, and identifier entries and related entries that uniquely identify the CI.

Review the following before creating identification rules:
  • Identification rules
  • General guidelines for using CMDB Identification
  • Explore predefined identification rules:
    1. Navigate to All > CI Class Manager.
    2. Select Hierarchy and then search and select, for example, the Hardware class.
    3. In the Hardware bar, expand Class Info and select Identification Rule.
    4. Examine all the sections and tiles with the settings of the Hardware class identification rule.

Procedure

  1. Navigate to All > Configuration > CI Class Manager.
  2. Select Hierarchy to show the CI Classes list and then select the class for which to create an identification rule.
  3. In the class navigation bar, expand Class Info and then select Identification Rule.
  4. Select Edit, Add, or Replace (for a class that has derived the CI identification rule), in the Identification Rule section to create one.
  5. Fill out the form, and then select Save.
    Field Description
    Independent/Dependent Designation of whether the CI identifier can identify the CI independently of other CIs, or not.
    Note: To set the rule as Dependent, you must specify dependent relationship rules for the selected class.
    Name Name of CI identifier.
    Description Description of the CI identifier.
  6. In the Identifier Entries section, select an existing identifier entry to edit, or select Add to create one.
  7. In the Identifier Entry dialog box, choose an option and then select Next.
    Continue with one of the following three steps according to the option you selected:
    Option Description
    Use attributes from main table <table> Lets you select attributes from the currently selected table (regular identifier entry).
    Use attributes from another table (Lookup table) Lets you select attributes from any related table, other than the currently selected table (lookup identifier entry).
    Use attributes from main and another table (Hybrid) Lets you select attributes from both the currently selected table, and from another table (hybrid identifier entry).
  8. Use attributes from main table <'table'> option: Set the options on the form and then select Save.

    Search On Table is preset to the currently selected table in the CI Classes list.

    Note: If criterion attributes have only two attributes and sys_class_name is one of them (for example [name, sys_class_name], [ip_address, sys_class_name]), then the other attribute cannot be NULL, even if Allow null attribute is enabled. This restriction is due to sys_class_name being considered a special system matching attribute.
  9. Use attributes from another table (Lookup table) option:
    1. Set Search On Table to a table other than the currently selected table in the CI Classes list.
      The Search On Table must have a reference field to cmdb_ci, otherwise the identifier entry is considered invalid.
    2. Set the rest of the fields as described in the previous step.
    3. (Optional) Select Advanced options and enter the information for a lookup identifier (scroll down if necessary).
      Advanced Option Description
      All of these conditions must be met A filter to narrow the set of records that will be searched for a matching CI.
      Enforce exact count match For lookup identification, match a CI only on exact lookup records count match.
      When enforced, all lookup items for a CI in the payload must have matching records in the lookup table, that reference the same CI:
      1. Only matches CIs that have all the lookup items from the input payload referencing the CI in CMDB.
      2. If there are multiple matches, selects the oldest created CI as the final match.
      When not enforced, one lookup item for a CI in the payload matching a record in the lookup table, is sufficient to consider a match:
      1. Matches any CI that has at least one of the lookup items from the input payload referencing the CI in CMDB.
      2. If there are multiple matches, selects the CIs with the max number of lookup items from the input payload referencing the CI in CMDB.
      3. If there are still multiple matches, selects the oldest created CI as the final match.
    4. Select Save.
  10. Use attributes from main and another table (Hybrid) option:
    1. Set the options on the General Settings tab as described in previous steps, and then select Next.
    2. On the Main Table Settings tab, select the attributes to use from the currently selected table, and then select Next.
      Search On Table is preset to the currently selected table in the CI Classes list.
    3. On the Lookup Table Settings tab, select a Search On Table and then in Criterion Attributes select attributes from the specified table. Search On Table must have a reference field to cmdb_ci, otherwise the identifier entry is considered invalid.
      You can select Advanced options and enter the information for a lookup identifier as described in the previous step (scroll down if necessary).
    4. Select Save.
    Note: The Allow null attribute option in the hybrid option, is set to false. Therefore, all of the selected criterion attributes from both the currently selected table and the lookup table, must have a value. Also, setting optional conditions is available only for the lookup table, and is not available for the main table.
  11. (Optional) On the Related Entries section select an existing related entry to edit, or select Add to create one.
    1. Update the Related Entry form and then select Save.
      Note: If criterion attributes have only two attributes and sys_class_name is one of them (for example [name, sys_class_name], [ip_address, sys_class_name]), then the other attribute cannot be NULL, even if Allow null attribute is enabled. This restriction is due to sys_class_name being considered a special system matching attribute.

Example

For example, the pre-defined Hardware Rule applies to the Hardware [cmdb_ci_hardware] table. It has an identifier entry with the criterion attribute Serial Number, Serial Number Type and its Search on table field is set to Serial Number.

The following payload snippet adds a CI to the cmdb_ci_linux_server class, that is a child of the Hardware class. It also shows how you can add related items in the payload for which you should create Related Entries on the CI Identifier page for the Hardware [cmdb_ci_hardware] table:


{
    "items": [
        {
            "className": "cmdb_ci_linux_server",
            "lookup": [
                {
                    "className": "cmdb_serial_number",
                    "values": {
                        "serial_number": "VMware-42 21 e3 da 44 14 5a a6-56 48 2b 0a 28 53 42 4c",
                        "serial_number_type": "system",
                        "valid": "true"
                    }
                },
                {
                    "className": "cmdb_serial_number",
                    "values": {
                        "serial_number": "4221E3DA-4414-5AA6-5648-2B0A2853424C",
                        "serial_number_type": "uuid",
                        "valid": "true"
                    }
                },                }
            ],

    “related": [
                {
                    "className": "cmdb_ci_ucs_chassis",
                    "values": {
                        “name": “chassis1",
                        “category": “category1",
                        “short_description": “My Chassis 1"
                    }
                },
                {
                    "className": "cmdb_ci_ucs_chassis",
                    "values": {
                        “name": "chassis2",
                        "category": "category2",
                        "short_description": "My Chassis 2"
                    }
                },    }
     ],

            "values": {
                ......
                "name": "xpolog2.lab3",
                "os_name": "Linux",
                "output": "Linux xpolog2.lab3 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux",
                "serial_number": "VMware-42 21 e3 da 44 14 5a a6-56 48 2b 0a 28 53 42 4c",
                "sys_class_name": "cmdb_ci_linux_server"
            }
        }
    ]
}
                         

When the Hardware Rule is applied, the Serial Number [cmdb_serial_number] table is searched for a match with the values specified within the lookup key. Unless Enforce exact count match (Lookup) is checked, it is not necessary for every lookup key to return a match, as long as there is at least one match. If all matches reference the same CI, then that CI is considered to be the existing CI record. If no match is found, then the identification search continues to the next rule entry. If after all the rules are exhausted without finding a match, a new CI record is created in the database.

What to do next

You can optionally create an inclusion rule to narrow the scope of CIs that are included in identification.