How Host name for Linux is identified in Discovery

imranbasham
Tera Contributor

Hi,

I like to know how discovery identifies the hostname for Linux servers.

when I checked the probe I don't find anything like nslookup

please share the probe name and the exact command used to identify the hostname.

 

Regards,

Imran Basha M.

 

6 REPLIES 6

Jeff Currier
ServiceNow Employee
ServiceNow Employee

According to the docs, it is using DNS to get it.  Most of the commands are given here, but not for name, other than DNS and NBT.

Rajesh Kannan
ServiceNow Employee
ServiceNow Employee

Hi Imran,

 

As I checked, 

 

If Discovery uses a probe, then the "Linux - Identify" is responsible for collecting hostname and updates to CMDB.

If Discovery uses pattern, then the step "Extract hostname from uname" in discovery pattern "Linux Server" used to collect the hostname.

 

It seems both the probe and pattern uses command "uname" to get the hostname.

 

Regards,

Rajesh.

karmeng
ServiceNow Employee
ServiceNow Employee

Hi Imran,

For pattern, "Linux Server" responsible for the host name.

 

find_real_file.png

 

Regards,

Kar Meng

robertgeen
Tera Guru

Just to add some more detail to this depending on how you have discovery properties setup it may change. Out of the box though the name is pulled from DNS during the Shazzam phase and it will use that if it successfully discovers. If you have the discovery property checked to use the name coming back from discovery then it will use what comes back from uname. 

If you are using patterns there are some pre/post processing scripts that set it but I believe they work the same way. Hope this helps.