An identification rule tells the CMDB how to decide whether incoming data describes a CI that already exists or a new one. Each rule belongs to one CI class and holds identifier entries ranked by priority, plus optional related entries. Entries match on the CI’s own attributes, on a related lookup table, or on both.
What an identification rule is made of
A rule is attached to a CI class. Each CMDB class can have one identification rule, and that rule is made up of a CI identifier, one or more identifier entries, and related entries. Each entry carries its own priority, which is what lets a rule try a strong match first and a weaker one afterwards. For the engine that applies these rules, see the identification and reconciliation engine explained.
The two kinds of entry do different jobs. Identifier entries define a set of attributes that is meant to be unique at that priority. Related entries do not identify the CI at all. They describe records on other tables that hang off the CI, so that those records can be created or updated alongside it once the CI has been identified.
The three kinds of identifier entry
An identifier entry comes in one of three types. The choice depends on where the unique value lives.
| Entry type | Matches on | Typical use |
|---|---|---|
| Regular | Attributes of the CI’s own table | A set of the CI’s own attributes that together single out one CI |
| Lookup | A separate table that references the CI | Values held as several rows, such as serial number records or network adapters |
| Hybrid | A regular entry and a lookup entry together | Cases where neither half is unique alone |
Regular entries
A regular entry compares the CI’s own attributes. The attributes together must be enough to single out one CI. This is field-based identification, and it is usually the easiest type to reason about and test.
Lookup entries
A lookup entry reaches into a related table, such as one holding serial numbers or network adapters. The lookup table needs a reference field that points to the base CI table (cmdb_ci).
Lookup entries have an option to enforce an exact count match. With it on, a CI matches only when all of its lookup items in the payload have matching records that reference that same CI. A separate page covers CI lookup rules in more detail.
Hybrid entries
A hybrid entry exists for the case where a lookup alone cannot separate two CIs. The example worth remembering is two virtual machines in a cloud that report the same serial number and serial number type. A lookup on those two values cannot tell them apart. Adding the Name field from the main hardware table to the match makes the combination unique. For hybrid entries Allow null attribute is false by default, so all selected attributes need values.
Priority decides which entry runs first
Entries are evaluated in priority order, and a lower priority number is applied first. Entries that share a priority number are applied randomly, so giving two entries the same number makes the behaviour hard to predict. Put the strongest entry at the lowest number so it is applied first, and give weaker entries higher numbers after it.
At least one identifier entry must be active for the rule to apply at all. Switching off the last active entry therefore does not leave the class with a weaker rule. It leaves the rule not applying.
Criterion attributes: what makes an entry strong or weak
Each entry names criterion attributes, the fields whose values are compared. Two ideas sit behind them. Unique attributes are sets of values that can single out a CI, and they can come from the CI’s own table or from derived tables. Required attributes are fields that cannot be empty.
Several details affect how reliable a given choice is.
- The null setting. Each entry has an option to allow a null attribute. When an entry has only two criterion attributes and one of them is the class name field, the other cannot be null even if the option is on.
- Reference fields. A reference field is a weak criterion attribute. If its value is invalid it becomes Unknown, and when several CIs end up holding that same Unknown value, they become duplicate CIs.
- Conflicting rules. A Hardware lookup rule for network adapters combined with a separate identifier on the Network Adapter class creates contradictory rules, and duplicates might be created in the Network Adapter table.
Independent and dependent rules
Some CIs exist on their own. A server is the usual example. Others only make sense in relation to another CI. A network adapter belongs to the hardware that contains it. This dependency is defined per class through dependent relationship rules.
The rule type follows from that.
- An independent rule identifies a CI from its own attributes alone.
- A dependent rule is for a CI that depends on another CI. A dependent CI can have only a single parent CI with dependency, and the Dependent setting needs dependent relationship rules for the class.
A rule can be set to dependent only when dependent relationship rules exist for the class. The “allow fallback to parent’s rules” option on an entry applies only to dependent rules.
Inheritance down the class hierarchy
A child class that has no rule of its own uses its parent’s rule, including its identifier entries and related entries. For how classes relate to each other, see CMDB classes explained.
The consequence that catches people out is what happens when you define a rule on the child. The new rule replaces the inherited one, and the inherited entries stop applying. Nothing is merged. If the parent’s rule included a related entry for software instances and you create an explicit rule on the child class, that related entry is gone until you add it to the child’s rule yourself.
A rule can be edited only at the class where it is defined. On a class that derives its rule, the options in the Identification Rule section are Add or Replace rather than a plain edit.
Creating a rule in CI Class Manager
The itil and sn_cmdb_editor roles have read access to the rule, and itil_admin or sn_cmdb_admin has full access. The path runs through CI Class Manager. The wider picture is in CMDB identification and reconciliation.
- Open CI Class Manager and select Hierarchy to see the class list.
- Select the class the rule is for.
- In the class navigation, expand Class Info and select Identification Rule.
- Choose Edit, Add or Replace, depending on whether the class already has its own rule.
- Choose whether the rule is independent or dependent.
- Under Identifier Entries, add an entry and choose its source: attributes from the main table, attributes from another table (lookup), or attributes from both (hybrid).
- For a regular entry, set Active, Priority, Criterion Attributes, Allow null attribute and Allow fallback to parent’s rules, then save.
- For a lookup entry, set the search table to a different table, and optionally turn on the exact count match.
- If the class needs them, add related entries with the related table, the referenced field, a priority and criterion attributes.
The optional advanced conditions on an entry appear only when a specific system property is true, and that property is false by default. The predefined conditions deserve a review before it is turned on.
Inclusion rules narrow what gets identified
Inclusion rules are separate from the rule itself. They limit which CIs go through identification for independent CIs. A filter might keep processing to operational CIs, for instance. When no inclusion rule exists for a class, CIs of that class all go through identification, and the base system ships with none defined.
They apply to any script that calls the identification engine, so a rule that excludes a type of CI can stop that type from being identified, with knock-on effects for features such as Discovery and Service Mapping. See the Discovery section and the Service Mapping section for those features.
For related guidance, see CMDB best practices.
Frequently asked questions
How many identification rules can a CI class have?
Each CMDB class can have one identification rule. That rule can hold several identifier entries at different priorities.
What is the difference between a lookup entry and a hybrid entry?
A lookup entry matches through a separate table that references the CI. A hybrid entry combines a regular entry with a lookup entry, which is the way to separate CIs that look identical on the lookup values alone, such as two virtual machines with the same serial number.
Does a child class use its parent’s rule?
Yes, when the child has no rule of its own. If you create a rule on the child, it replaces the inherited one and the inherited entries stop applying.
What does the priority number do?
It sets the order of evaluation. Lower numbers are applied first, and entries that share a number are applied randomly.
Do related entries identify a CI?
No. They are used to create or update records on other tables that are associated with the CI once it has been identified.