How to create a relationship between 2 servers through Discovery?

Hamza Berouil1
Tera Expert

 

Hi all,

 

We ran Discovery on 2 IP addresses: one for an application server and the other for a database server. 

The application server depends on the database server and both servers are Linux. 

When Discovery is run, both servers are correctly created/updated as well as their linked CIs (Disk, WebLogic, Apache, etc.). 

However, the relationship between both servers is not created. 

In the TCP Connection [cmdb_tcp] and Running Processes [cmdb_running_process] tables, we found records that link the servers. 

 

HamzaBerouil1_0-1698352124877.png

 

 

It looks like we need to create an additional configuration to make this happen... 

We’ve explored different solutions including Process Classifications and Create Relation/Reference step, with no luck. 

Then we created a Pattern Post Script that creates relations between 2 Linux Servers based on TCP Connections. We noticed those TCP connections follow a specific pattern, so we wrote a script that creates CI relations whenever it finds a TCP connection where the IP value is different from the related Computer Address IP (plus other additional conditions based on the process name). The script checks whether the relation already exists before creating it. 

 

Now, the relations are being created correctly, however, we are surprised to see that Discovery doesn’t create this relation by default or at least with a little configuration. Instead, we had to create a custom script that is specific to the environment we are trying to discover, so if we try to discover a different environment, we would probably need to readapt it or create a new one. 

 

I am new to Discovery, so I am wondering if someone can help us to find a better solution. Do you think there is a better solution than a specific Post Script? What other solution can we explore? 

 

Thank you! 

 

#discovery #itom 

 

1 ACCEPTED SOLUTION

Hamza Berouil1
Tera Expert

I've submitted the question to ServiceNow support, and they confirmed the relationship I am trying to create comes with Service Mapping and not Discovery

View solution in original post

3 REPLIES 3

doug_schulze
ServiceNow Employee
ServiceNow Employee

What you describe are oob capabilities with no need for any additional scripting on your part.  Id check with support.

thank you Doug.

 

Do you know what is supposed to create this relationship? Is it a pattern or something else?

I checked all the patterns that are executed, but I did not find any step that is supposed to create this relation.

 

Any idea where to look?

Hamza Berouil1
Tera Expert

I've submitted the question to ServiceNow support, and they confirmed the relationship I am trying to create comes with Service Mapping and not Discovery