How to relate Server to Rack

Andreas Visby
Tera Contributor

Hi.

We are populating our CMDB from a scripted rest api (not using discovery) utilizing the InR in said rest api.

We are in the process of pushing our Servers into the CMDB, and we have a problem since we would like to create a relation to an existing Rack but we can't. The Rack doesn't have any identitifaction rules OOB (which makes sense), but this means we can't add the Rack in the payload to the Rest API and add a relation. So my question is:
How do we create a relation between a Rack and a CI (Server/Network Equipment)? 

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

You need to define suggested relationships between server and rack class so that you can relate CI between these classes.

Please check below for more details

 

https://docs.servicenow.com/bundle/london-servicenow-platform/page/product/configuration-management/reference/r_SuggestedRelationshipModel.html

 

If your Asset and your CI have a Location defined down to the specific grid location that designates the location of the rack in your data center, you can then create business rules that set the Rack reference (or relationship) on the CI based on whether there is a Rack found at that location. 

Example:

  1. Define a Location of "Grid-YZ05" with a parent Location of "Room123" (etc.)
  2. The location of my Windows Server CI "MyWinServer" is "Room123/Grid-YZ05"
  3. Is there a Rack CI with a location: "Room123/Grid-YZ05"?  Yes.  It's called "ServerFarmRack_03".
  4. Associate the "MyWinServer" Server CI with the "ServerFarmRack_03" Rack CI.

 

Regards,

Sachin

If you've already created this business rule, can you share it here?

VaranAwesomenow
Mega Sage

OOB suggested relationships show Computer to Rack as Rack powers computer with Rack as parent and Computer as child, this kind of confuses the way direction of relationship works, because ideally Rack should be child and Computer should be parent, so ServiceNow has published a KB article

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0788463

that talks about another relationship type = In Rack : Rack Contains, but there is no suggested relationship configured OOB.
Hence customers have to configure a suggested relationship with base class as server, network gear, network circuit and so on and dependent class as rack with relationship type = In Rack (Parent)

PF sample suggested relationship record for your reference.

Once this configured then example relationship in dependency view would look like below.

VaranAwesomenow_0-1667655931639.png