No containers/relationships displayed in Identification Simulator

Problem

For some CI Classes in my ServiceNow instance, the Identification Simulator doesn't give me Container Level 1/2 so I cant build the relationships between my CI Classes to use with Cookdown Discovery.


Example: for CI Class "IIS Website" I am expecting to get an option for container Level 1 and Container Level 2 (for "Microsoft IIS Web Server" and "Windows Server" classes) in for me to construct a payload I can use with Cookdown Discovery, as I see for the "MS SQL Database" Class. Without these Container Levels the CIs my payload will generate have no relationships:

Solution

Identification Simulator decides whether to show container levels based on the "Dependant Relationships" defined in CI Class Manager for the selected class (which you can only create when there is one or more Identifier for the class with the "Independent" flag unchecked) a. For "MS SQL DataBase" class the following dependants are setup, for example:

There are 2 workarounds for this issue

Option 1: Add a Dependent Relationship

A Dependant Relationship can be added for the CI Class in question in your CMDB which will be displayed by Identification Simulator and allow you to build the relationships you need

Caution!

Warning: Changes of this nature will impact other discovery sources that currently push CIs into your CMDB for the class you are modifying. Such changes should not be made without careful consideration and planning

To do this as by following the below steps which use the example class of "IIS Website":

  1. Navigate to "CI Class Manager" in ServiceNow
  2. Click Open Hierarchy and search the CI Class list for the class you want to add Dependant Relationships to
  3. Click "Identification Rule" to show how your CMDB decides when a received CI is unique or not. You will likely see "Independent" on the displayed rule. This means CIs of this class do not have to be related to a CI of any other class
  4. Click Edit, select Dependant then hit Save
  5. You should see "Dependent Relationships" added to the navigation bar on the left side of the CI Class Manager. Select it
  6. .
  7. Note that the CI Class you are viewing has no Dependent Relationships. Click Override Dependencies to create a relationship between the selected class and another one
  8. Select the correct rule type you want to create, the relationship type and target class then hit save. Note it is important you understand the difference between the different types of rule available - these are documented here
  9. Select "All Relationship Rules" and confirm the relationship you created looks as expected

It is possible to follow these steps, create your Cookdown Discovery payload using Identification Simulator and then remove the relationship created if you are concerned about the impact on other Discovery sources.

Option 2: Create your payload manually

If your CMDB contains relationship types between the CI Classes you want to relate (which most do via the inherited relationships) you can create a payload for each CI Class which you combine using notepad and the below syntax for the relationships

  "relations": [
    {
      "type": "Hosted on::Hosts",
      "parent": 0,
      "child": 1
    }

As used in a full payload created in this manner:

{
  "items": [
    {
      "className": "cmdb_ci_win_cluster_node",
      "lookup": [],
      "values": {
        "server": "Microsoft.Windows.Computer:::NetbiosComputerName",
        "cluster": "Microsoft.Windows.Computer::Microsoft.Windows.Cluster.Node::ClusterName",
        "fqdn": "Microsoft.Windows.Computer:::PrincipalName",
        "name": "Microsoft.Windows.Computer::Microsoft.Windows.Cluster.Node::NodeName"
      }
    },
 {
      "className": "cmdb_ci_win_server",
      "lookup": [],
      "values": {
          "name": "Microsoft.Windows.Computer:::NetbiosComputerName"
      }
    }
  ],
 
  "relations": [
    {
      "type": "Hosted on::Hosts",
      "parent": 0,
      "child": 1
    }
  ]
}


Applies to

Kingston, London, Madrid