Last active
November 1, 2018 17:20
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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