#!/bin/sh
##########################################
#########################################
PROD_STATUS=`curl https://<omshostname.com>:7799/em/console/logon/logon -I -k -s | head -1 | awk '{print $3}'| tr -d '\r'`
##
DEV_STATUS=`curl https://<omshostname.com>:7799/em/console/logon/logon -I -k -s | head -1 | awk '{print $3}'| tr -d '\r'`
##For Prod Oms Status Checking##
if [ "$PROD_STATUS" == "OK" ]
then
echo "Prod Oms is running fine on host <omshostname.com>" | mailx -s 'Prod OMS Status' reyaj.alam@gxy.com
else
echo "Prod Oms is down on host <omshostname.com>" | mailx -s 'Prod OMS Status' reyaj.alam@gxy.com
fi
##For Dev Oms Status Checking##
if [ "$DEV_STATUS" == "OK" ]
then
echo "Dev Oms is running fine on host <omshostname.com>" | mailx -s 'Dev OMS Status' reyaj.alam@gxy.com
else
echo "Dev Oms is down on host<omshostname.com>" | mailx -s 'Dev OMS Status' reyaj.alam@gxy.com
fi
##
~
##########################################
#########################################
PROD_STATUS=`curl https://<omshostname.com>:7799/em/console/logon/logon -I -k -s | head -1 | awk '{print $3}'| tr -d '\r'`
##
DEV_STATUS=`curl https://<omshostname.com>:7799/em/console/logon/logon -I -k -s | head -1 | awk '{print $3}'| tr -d '\r'`
##For Prod Oms Status Checking##
if [ "$PROD_STATUS" == "OK" ]
then
echo "Prod Oms is running fine on host <omshostname.com>" | mailx -s 'Prod OMS Status' reyaj.alam@gxy.com
else
echo "Prod Oms is down on host <omshostname.com>" | mailx -s 'Prod OMS Status' reyaj.alam@gxy.com
fi
##For Dev Oms Status Checking##
if [ "$DEV_STATUS" == "OK" ]
then
echo "Dev Oms is running fine on host <omshostname.com>" | mailx -s 'Dev OMS Status' reyaj.alam@gxy.com
else
echo "Dev Oms is down on host<omshostname.com>" | mailx -s 'Dev OMS Status' reyaj.alam@gxy.com
fi
##
~
No comments:
Post a Comment