export PATH=$PATH:/usr/local/bin
rm /tmp/discourl_chk.out
curl -sSf http://oracle-1.google.com:8090/discoverer/viewer > /tmp/discourl_chk.out
if [ $? -ne 0 ]; then
ERROR_SUBJECT="CRITICAL: DISCO URL NOT REACHABLE - http://oracle-1.google.com:8090/discoverer/viewer "
/usr/bin/mailx -s "$ERROR_SUBJECT" remote_dba@gmail.com,dba@gmail.com < /tmp/discourl_chk.out
else
echo "NO ERROR, URL is accessible! Relax"
fi
rm /tmp/discourl_chk.out
curl -sSf http://oracle-1.google.com:8090/discoverer/viewer > /tmp/discourl_chk.out
if [ $? -ne 0 ]; then
ERROR_SUBJECT="CRITICAL: DISCO URL NOT REACHABLE - http://oracle-1.google.com:8090/discoverer/viewer "
/usr/bin/mailx -s "$ERROR_SUBJECT" remote_dba@gmail.com,dba@gmail.com < /tmp/discourl_chk.out
else
echo "NO ERROR, URL is accessible! Relax"
fi
No comments:
Post a Comment