this is what i want to get
- IF the gap >= 10 and file /tmp/<dbname>_alert does not exist
THEN
o send an email to create a new case and dispatch to aim_dba
o Create the file /tmp/dbname_alert
If /tmp/<dbname>_alert exists and the gap <=9
? Remove the file /tmp/<dbname>_alert
here is some of my output from the unix script
-----------------------
elif
gap>=10 and /tmp/<dbname> <>exist
then
send_mail
fi
gap<=9 and /tmp exists
then
rm /tmp
-----------------------------
also have a function that shows the gap in delay and sends mail
elif [ ${GAP} -ge ${DELAY} ]; then
SUBJECT="$HOST: ERROR - Standby Database ${ORACLE_SID} is $GAP hours behind"
MESSAGE="`date` CRITICAL ERROR: ${ORACLE_SID} on ${HOST} is $GAP hours behind
, Error Limit is set at ${DELAY} hours, action required"
echo $MESSAGE > ${MESSAGE_FILE}.${ORACLE_SID}
echo "`date` Sending Message File.\n"
send_message
fi
echo
echo "$MESSAGE"
echo
}
anyone got any better way to do this in one function where i send the email if the gap is >=10 and create the file in /tmp
else if gap<9 hours files already exists in TMP and remove it
- IF the gap >= 10 and file /tmp/<dbname>_alert does not exist
THEN
o send an email to create a new case and dispatch to aim_dba
o Create the file /tmp/dbname_alert
If /tmp/<dbname>_alert exists and the gap <=9
? Remove the file /tmp/<dbname>_alert
here is some of my output from the unix script
-----------------------
elif
gap>=10 and /tmp/<dbname> <>exist
then
send_mail
fi
gap<=9 and /tmp exists
then
rm /tmp
-----------------------------
also have a function that shows the gap in delay and sends mail
elif [ ${GAP} -ge ${DELAY} ]; then
SUBJECT="$HOST: ERROR - Standby Database ${ORACLE_SID} is $GAP hours behind"
MESSAGE="`date` CRITICAL ERROR: ${ORACLE_SID} on ${HOST} is $GAP hours behind
, Error Limit is set at ${DELAY} hours, action required"
echo $MESSAGE > ${MESSAGE_FILE}.${ORACLE_SID}
echo "`date` Sending Message File.\n"
send_message
fi
echo
echo "$MESSAGE"
echo
}
anyone got any better way to do this in one function where i send the email if the gap is >=10 and create the file in /tmp
else if gap<9 hours files already exists in TMP and remove it