19 August, 2016

Monitoring a URL script

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

No comments:

Post a Comment

OEM Agent Installation

./agentDeploy.sh AGENT_BASE_DIR=/u001/oracle/product/agent13c OMS_HOST=oem-dev.xxx.com EM_UPLOAD_PORT=1159 AGENT_REGISTRATION_PASSWORD=*****...