Is any one have any idea how to populate the full DNS name of device without modifying the global property to append the full DNS name with device.

Saurabh Kumar2
Mega Guru

Is any one have any idea how to populate the full DNS name of device without modifying the global property to append the full DNS name with device?

I want to populate the full DNS name for some of the devices in a custom field.

12 REPLIES 12

Thanks Aleck.



I wrote a custom probe for Linux server to get the dns domain name by using command "dnsdomainname" and now it is populating the DNS domain for linux server. But still we have lot of devices where DNS Domain is blank.:(


doug_schulze
ServiceNow Employee
ServiceNow Employee

I would think you have to strip it for the class you want it not included on.. Or check Field Normalization - ServiceNow Wiki for options...



Either way you are going to have to populate it then remove what you don't want


Thanks Doug.



I want name of the device without the domain name but additional to this I need fully qualified domain name of the device also.


I have below two ways in my mind to achieve it.Please suggest the better one.



1) Set the property "Include domain name in host name:" to true and then by business rule set the FQDN field & populate the name by truncating the domain name.




2) Populate the name without domain name by OOb reg exp. By business rule populate the FQDN by concatenating the value of "name" & "dns_domain". But here the challenge is to populate the dns_domain for the devices wherever Service now doesn't populate dns domain OOB.(for example -Linux Server)





Have a look at "HostnameJS" script include. It has complete FQDN and is used for all. Try n' grab that FQDN and populate it in your new field. You will need a new sensor to achieve this I believe. Let us know how you solved it once you are through.



- AL


Is there a reason for the cmdb_ci_dns_name table to stop getting updated. I am not seeing the DNS name getting populated for any of the CIs which have a DNS name. I see the dns name in the input of the ecc queue, its just that not getting populated in the table.



Sandesh.