Shell Script to Monitor and Get Alert for Workflow Notification Mailer and Components in Oracle Apps
I am going to share how to check workflow notification mailers and service components using shells scripts.
There can be multiple methods to do the same and write scripts
Create a SQL script
cat wf_mailer_status_component.sql
spool /tmp/wf_mailer_status_component.log
alter session set nls_date_format='DD-MON-RRRR HH24:MI:SS';
select sysdate from dual;
select component_id,component_name,component_status from apps.fnd_svc_components where component_id in ('10002','10003','10004','10005','10006','10040','10022','10023')
and component_status <> 'RUNNING';
spool off
exit
Create a shell script to call the SQL and trigger the alert to send mail
cat wf_mailer_status_components.sh
date
. /u01/oracle/FUAT/apps/apps_st/appl/APPSFUAT_sgap2.env
sqlplus "apps/apps" @/home/applmgr/bin/wf_mailer_status_component.sql
cnt=`grep -c "no rows selected" /tmp/wf_mailer_status_component.log`
if [ $cnt -eq 0 ]
then
mailx -s "Critical: FUAT - Workflow Notification Mailer Components Not Running" support@funoracleapps.com < /tmp/wf_mailer_status_component.log
fi
Schedule cron to run every 15 mins
*/15 * * * * /home/applmgr/bin/wf_mailer_status_components.sh >/tmp/wf_components.log 2>&1
Post a Comment
Post a Comment