As an oracle dba, we need to automate things to make our life easy. So we need to monitor the below activities.
1. Alert log, place where database errors are logged.
2. File system, to check the threshold of the space where the datafiles/logfiles/control files/archive logs are stored.
3. Database and Listener availability
4. Log rotate, deleting trace files that are older than 5 days.
5. Scheduling Gather stats, which helps optimizer to create better plans(not always).

Scripts to Monitor Oracle database

1.File system Check

#######################################################################
#
# check_FS.sh
#
# Script for checking mount point space by passing threshold limit as an argument
#
# From Sakthi DB Technology
#
#########################################################################

for i in `df -P|grep -v "File"|tr -s " " "~"|cut -d"~" -f5|tr -s "%" " "`
do
if [ $i -gt $1 ]
then
echo $i
fi
done

OR


#######################################################################
#
# check_FS.sh
#
# Script for checking mount point space by passing threshold limit as an argument
#
# From Sakthi DB Technology
#
#########################################################################

for i in `df -h|grep -v "File"|awk {"print $5"}|tr -s "%" " "`
do
if [ $i -gt $1 ]
then
echo $i
fi
done

2. Check the Status of DB in the server

#######################################################################
#
# Usage : ./check_db.sh
#
# Script for checking the status of databases in a server
#
# From Sakthi DB Technology
#
#########################################################################
for i in `ps -ef|grep pmon | awk '{print $8}'|grep -v "grep"|cut -d"_" -f3`
do
export ORACLE_SID=$i
sqlplus -s /nolog </tmp/temp.sql
set head off echo off
conn / as sysdba
select decode(open_mode,'READ WRITE','OPEN','MOUNT') from v\$database;
exit
EOF
for x in `cat /tmp/temp.sql |egrep "OPEN|MOUNT|ORA-01507"|grep -v "^sel"|awk {'print $1}'`
do
if [ "$x" = "ORA-01507:" ]
then
echo "Database $i in NOMOUNT stage"
else
echo "Database $i in $x stage"
fi
done
rm /tmp/temp.sql
done

3. Commands in .bash_profile

#######################################################################
#
# vi .bash_profile
#
# Entries in .bash_profile
#
# From Sakthi DB Technology
#
#########################################################################