Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DNS Server Status?

Status
Not open for further replies.

Haunter

Programmer
Jan 2, 2001
379
US
Ok I have a requirement to check three DNS servers to see if they are availible or not? My solution was to just set my local DNS to the IP of the desired DNS server and making a query. IF results then it is up. Well the problem if it is down it Net::DNS waits a long time to retry querys I believe.

Anyone have a better idea how to do this on than ping? Basically I dont need to know if ping is up. I need to know if the DNS dameon is working on the particular server. Is there a DNS status query I can issue? Has anyone else had this requirement put on them.

Oh, I have not been given access to the server so I must do the server check from outsite the network.

Thanks>


haunter@battlestrata.com
 
On your prompt if a [red]telnet example.com 53[/red] or [red]telnet x.x.x.x 53[/red] fails then the dns daemon is down.
If this rings you something then take a look at then Net::Telnet documentation.


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
Just a follup,


This option worked great since I initially used Net::DNS. This worked like a charm. Star for knowing this little factoid!


haunter@battlestrata.com
 
Crude an inaccurate. Just because the port doesn't show up as closed doesn't mean the service is responding. I'd recommend something like the nagios plugins. You can install them without even installing nagios, and the check_dns utility is much more accurate at determining the state of dns.

--
Andy
"Historically speaking, the presence of wheels in Unix has never precluded their reinvention." -- Larry Wall
 
Do you know of a native PERL way to check the status? I really and not concered of whether the server it up.. But whether the DNS service is up, the server is checked by another meains. The script wont alarm unless the port is inaccessible for a period of time. If the port is inaccessible for say greater than 5-10min then an appropiate alarm can be generated to necessitate more appropiate intervention. I realize that the DNS may not be availible in high volume times and this does not mean it is down. We just want a simple check on its status.

The Net::DNS module failed because it is designed to make a resolution. So if you set the DNS server manually in the constructor and it fails it will look for the server running the scripts DNS settings an use those. Once it makes a match of a working server it moves to the top of the DNS search order thereby bypassing other servers being looked at for the resolution. WE did not test the Net::DNS module heavily due to a tight time table. It may very well work but under our time line we didnt waste anymore time with it since the telnet solution worked like we expectd.

We are still looking to optimize our solution since Net::Telnet will sit and wait for a connection instead of doing a simple test and closing. Maybe this is better not sure at the moment. But it works..

Open to more suggestions if anyone has one. I will look at the negros plugins.

Thanks


haunter@battlestrata.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top