How to find related items for a CI

Peter Farr
Giga Contributor

Given a GlideRecord for a particular CI how does one find all the related CIs? For example, a search has returned me a GlideRecord for a cmdb_ci_network_adapter or cmdb_ci_ip_address entry and I want to find the Computer class it is related to. I am probably being dense, but it doesn't seem obvious to me.

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

The table that contains the CMDB CI relationships is called cmdb_rel_ci. It will give you a parent and a child to tell you whether the CI is a parent of another (e.g. a server to an app) or the child (e.g. database to an app). If you need to find out a top level service or if another CI is part of the relationship hierarchy then you will need to do a little more gliderecord query through the cmdb_rel_ci table to find what you are looking for. This may involve recursion which is a bit of a more advanced scripting topic.

View solution in original post

5 REPLIES 5

Peter Farr
Giga Contributor

See? I knew I was missing something obvious. Thanks for the info...