L2 discovery and relationships

ENo
Tera Contributor

Hello

We want to populate our ServiceNow instance with CMDB data. We are mainly interested in network equipment data and have therefore been experimenting with L2 discovery in our ServiceNow instance. So far our discovery setup retrieves a lot of the L2 data like switches, VLANs, ports, etc and that a lot of CIs are created. The discovery also creates a lot of relationships type Contains::Contained by and Uses::Used by typically between switch CIs and "port" CIs. But the discovery does not create any relationships of the type Connects to::Connected by between the switches. We can see that the Device Neighbors (discovery_device_neighbors table) is populated with data from LLDP, but no relationships are created. Is it possible to make the discovery create these relationships?

 

PS A side question is what are the differences between the relationship types Connects to::Connected by and Connected by::Connects and their usage.

2 ACCEPTED SOLUTIONS

emily1
Tera Guru

Look at the discovery logs for your CI in question, and notice the steps where the relationships are created. Use that logic, and create an extension section for the pattern(s) that uses logic similar to the OOTB pattern steps that configure the L2 relationships. Example below from Windows OS pattern.

emily1_0-1757097119699.png

emily1_1-1757097160921.png

 

 

You may also need to update the related CI types in the pattern to make sure discovery can create the relationship/update the corresponding record. Do this by accessing the pattern via the [sa_pattern] table and using the related list on the pattern record.

 

Hope this helps!

View solution in original post

Cindy Trieu
ServiceNow Employee
ServiceNow Employee

HI ENo,

 

To answer your side question about the differences between Connects to::Connected by and Connected by::Connects, they are essentially the reverse of each other. It is used in Event Management impact. They have these two different relationships for human readability. Here's my colleague's insight on the topic:

 

It's essentially two opposite directions of relationships.  In event management impact always bubbles up.  This restricts relationship direction by asking, "when x goes down, does it bring y down?".  If so then the parent is Y and the child is X (impact bubbles up from x to y).  If it is inverted then the parent needs to be X and the child Y.  Then you would just use human readable language for the relationship type.

X Connects to Y/Y is connected by X

or X is Connected by Y/Y connects to X

 

You can find examples of both connections in the Network Inventory Core application and load the demo data. For further questions, the team who maintains this application would be your go-to!

View solution in original post

2 REPLIES 2

emily1
Tera Guru

Look at the discovery logs for your CI in question, and notice the steps where the relationships are created. Use that logic, and create an extension section for the pattern(s) that uses logic similar to the OOTB pattern steps that configure the L2 relationships. Example below from Windows OS pattern.

emily1_0-1757097119699.png

emily1_1-1757097160921.png

 

 

You may also need to update the related CI types in the pattern to make sure discovery can create the relationship/update the corresponding record. Do this by accessing the pattern via the [sa_pattern] table and using the related list on the pattern record.

 

Hope this helps!

Cindy Trieu
ServiceNow Employee
ServiceNow Employee

HI ENo,

 

To answer your side question about the differences between Connects to::Connected by and Connected by::Connects, they are essentially the reverse of each other. It is used in Event Management impact. They have these two different relationships for human readability. Here's my colleague's insight on the topic:

 

It's essentially two opposite directions of relationships.  In event management impact always bubbles up.  This restricts relationship direction by asking, "when x goes down, does it bring y down?".  If so then the parent is Y and the child is X (impact bubbles up from x to y).  If it is inverted then the parent needs to be X and the child Y.  Then you would just use human readable language for the relationship type.

X Connects to Y/Y is connected by X

or X is Connected by Y/Y connects to X

 

You can find examples of both connections in the Network Inventory Core application and load the demo data. For further questions, the team who maintains this application would be your go-to!