How can I run DNS lookup from a server-side script

Endmost
Tera Expert

Hi,

Is it possible to run DNS lookup to a specific hostname from the server-side scripts? My intention is trying to identify if a hostname which is existent in the CMDB is still valid (registered in DNS) or not (usually identified as Bad Hostname).

The approach might not be the best one. You are very welcome to share any other methodologies if you have.

Thanks,
Endmost

 

6 REPLIES 6

Vivek,

I think you asked the key question. The CIs were discovered previously, but have stopped been discovered since some time ago. So I would like to do DNS look up to those CIs and mark them as Absent of something in the CMDB if they are not registered in DNS anymore. Do you think it make sense?

Thanks,
Endmost

Hi,

You can look at the 'DNS Lookup Enhanced' probe which also would do the same.

discovery_probes.do?sys_id=cd94a3817fb213001952baf8befa9165

 

Also, you can look into this if you don't have an integration hub.

http://www.john-james-andersen.com/blog/service-now/command-line-execution-with-servicenow-mid-servers.html

 

Regards,

Vivek