use dig to monitor DNS server for response

while true; do j=`dig < hostname > @W.X.Y.Z +short`; if [ "$j" != "" ]; then echo nodig |mail; break; fi ; sleep 1m; done;

This particular DNS server was only responding intermittently, so it needed some closer watching

Leave a Reply

Your email address will not be published. Required fields are marked *