How can I run DNS lookup from a server-side script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2022 11:23 PM
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
- Labels:
-
Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 05:31 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 08:16 AM
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