Why the difference between hosted & contained relationships matters with ServiceNow

Are you designing or working with structured configuration management data? No matter the technology platform, you will have come across relationships between various objects. These relationships are critical to keep your data points in perspective and build the bigger picture.

One question that often comes up, when working with relationships is:
What is the difference between Hosting and Containment relationships?

Well, most systems will have both of these types, this includes SCOM and ServiceNow, where Cookdown spend a good portion of our development time.

This post will focus on those relations and terminology found in ServiceNow; however, much of this should apply to other systems too.

Relationship basics

ServiceNow has an article on CI relationships in the CMDB which goes into more depth about the available tables and tools, but the extracted snippet below gives the basics we need. Constraints may exist between which types of objects can be used with which relationship types, but that is out of the scope of today’s post.

A relationship in the CMDB consists of two CIs and a relationship type:

- Parent CI

- Child CI

- Type of the relationship that links both CIs

Defining dependency

Relationships used to represent dependency must be declared through Relationship Rules. Taking a look at those currently in your instance, can give you an idea of what we are talking about.

You can view the rules in groups by navigating to:
Configuration > Identification/Reconciliation > Metadata Editor.

My preferred method is to view the rules at the class level, using the CI Class Manager (shown below).

Dependent Relationships for the Virtual Machine Instance Class


Containment type relationships

Example: MSFT SQL Instance CI contains a MS SQL DataBase CI

Example: MSFT SQL Instance CI contains a MS SQL DataBase CI

Containment rules are hierarchical in nature and are used as logical concepts to represent logical CIs.

Special containment rules called Endpoints indicate incoming and outgoing connections in a logical model.

Containment rules are stored in the CMDB Metadata Containment Rules [cmdb_metadata_containment] table.


Hosting type relationships

Example: an Application CI is hosted on a Server CI

Example: an Application CI is hosted on a Server CI

Hosting rules represent all the possible valid combinations of parent and child CI pairs (referred to as hosting and hosted CIs) in the CMDB service definition. Hosting rules are flat and cannot be more than one level deep. These hosting rules involve resources such as physical or virtual hardware and specifies the resource usage.

Hosting rules are stored in the CMDB Metadata Hosting Rules [cmdb_metadata_hosting] table.

Previous
Previous

Associating Incidents to a Problem

Next
Next

Announcing Easy Tune 2.0 - Everyday Tuning Made Easy