I created the following script that searches the 'RMAN-00571' text in our RMAN logs and writes the results to a logfile and then will email this log to our DBAs. I want to add a search that will verify that the "Recovery Manager complete" text also exists in all the logfiles. If this string does not exist then I also want to write the filename of the file that does not include this text to the RMAN_error.log
Note: The "Recovery Manager complete" verifies that the backup job finished. So if it did not finish, the DBAs need to be alerted.
#!/bin/ksh
#
# Report RMAN errors and send email to DBA - JAO 10/31/2005
#
export DBALIST="xyz@hotmail.com,xyz2@hotmail.com"
export date=`date`
grep -i "RMAN-00571" /u002/LOG/*/* > u002/LOG/RMAN_error.log
mailx -s "${date} RMAN errors" $DBALIST < /u002/LOG/RMAN_error.log
Note: The "Recovery Manager complete" verifies that the backup job finished. So if it did not finish, the DBAs need to be alerted.
#!/bin/ksh
#
# Report RMAN errors and send email to DBA - JAO 10/31/2005
#
export DBALIST="xyz@hotmail.com,xyz2@hotmail.com"
export date=`date`
grep -i "RMAN-00571" /u002/LOG/*/* > u002/LOG/RMAN_error.log
mailx -s "${date} RMAN errors" $DBALIST < /u002/LOG/RMAN_error.log