CI Relationships...
I've had a lot of questions from people about _Configuration Item (CI) relationships_. What exactly are they? How do they work? What causes Discovery to create them?Good questions!
From a human perspective, a CI relationship is a record of the notion that one CI is related to another CI in some way. This is analogous to writing down somewhere that Joe is Anne's plumber: you might say that Joe _works for_ Anne, or that Anne _uses_ Joe. In a very similar way, you can tell your Service-now CMDB that (say) the Great Plains 2 CI _depends on_ the Headquarters SQL CI, and that the Headquarters SQL CI is _used by_ the Great Plains 2 CI.
Just like a human relationship, a CI relationship often looks different (and we say it differently) depending on which end of the relationship is your reference point. Looking from one CI at the CIs that it depends on, you might see something like this: Great Plains 2 _depends on_ Headquarters SQL, which _runs on_ Server ABC. Great Plains 2 is directly dependent on Headquarters SQL, and indirectly dependent on Server ABC. On the other hand, if we looked at Server ABC to see what depended on it, we might see something like this: Server ABC _runs_ Headquarters SQL, which is _used by_ Great Plains 2\. But in both cases we're talking about the same two relationships — we just talk about them differently depending on our perspective.
Discovery records relationships in their own table, which you can see at **Discovery -> CI Relationships**. Each entry in this table has a reference to the "parent" CI, the "child" CI and the relationship type (these are defined in **Configuration -> CI Relation Types**). Parent and child here refer to the direction of dependency; the child is dependent on the parent. For the examples in the preceding paragraph, there would be two entries in this table:
| **Parent** | **Child** | **Type** |
| ---------------- | ---------------- | ------------------- |
| Great Plains 2 | Headquarters SQL | depends on::used by |
| Headquarters SQL | Server ABC | runs on::runs |
Note how the type includes the view from both directions.
Discovery creates relationships under serveral circumstances:
* When it finds known software running on a computer, such as a SQL server running on a Windows server.
* When it finds web applications running inside a web container, such as a trading application running inside JBoss.
* When it finds virtual computer instances running on a virtual computer host, such as a virtual Windows server instance running on a VMWare host.
* When it finds a TCP connection between two known software programs, such as finding a connection between a Great Plains instance and a SQL instance
All of these relationships Discovery finds and creates automatically. You may have some situations where you'd like to create CI relationships manually, and [this is very easy to do](http://wiki.service-now.com/index.php?title=Enterprise%5FCMDB). For example, you might want to have a CI for your Accounting business service. Discovery can't know what that consists of, but you could (very easily) manually create a _depends on::used by_ relationships from your Accounting business service CI to the Great Plains 2 CI. Then when you view the Accounting business service CI, you'll be able to instantly see what other CIs it depends on (directly or indirectly), and whether any of those CIs are having problems.
https://www.servicenow.com/community/in-other-news/ci-relationships/ba-p/2290325