use dig to monitor DNS server for response

while true; do j=`dig < hostname > @W.X.Y.Z +short`; if [ "$j" != "1.2.3.4" ]; then echo nodig |mail 8185551212@vtext.com; 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 *