Skip to content

Instantly share code, notes, and snippets.

@vchoi
Last active November 1, 2018 17:20
Show Gist options
  • Save vchoi/bf17d44eec2b61f55116fecbff84eca8 to your computer and use it in GitHub Desktop.
Save vchoi/bf17d44eec2b61f55116fecbff84eca8 to your computer and use it in GitHub Desktop.
Zabbix test script to check domains for DNSSEC errors using verisign dnssec debugger.
#!/bin/sh
TESTDOMAIN="$1"
if test -z "$TESTDOMAIN" ; then
cat << EOF
Usage: $0 test.domain.
EOF
exit 1
fi
if ! which w3m > /dev/null; then
echo ERROR: w3m not found. is it installed?
exit 1
fi
ERRORS=$(w3m -dump http://dnssec-debugger.verisignlabs.com/${TESTDOMAIN} 2> /dev/null | grep "\s.\[red\]\|\s.\[yellow\]")
if test -z "$ERRORS"; then
echo ${TESTDOMAIN} OK
exit 0
else
echo ${TESTDOMAIN} $ERRORS
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment