This content has been marked as final. Show 7 replies
You can setup Oracle Enterprise Manager Grid Control to send you email notifications if a database status changes or other failures occur.
True. But what could I do for the cronjob example?
1 person found this helpful
956685 wrote:You don't, at least not natively in cron. Your script would have to count the number of times it's emailed you and do it's own limiting. You should probably consider a more robust monitoring solution like DB console in your database (assuming it's Oracle) or Nagios or ZenOss or any one of those sorts of products.
I have a shell script setup to check a database table (log) every 2 minutes. If it finds rows it emails me (via cronjob). However, I get flooded with emails. How can I set a limit to the number of email/alerts I get.
Yes, the database I'm using is Oracle.
I do currently use Grid Control. It's good but what if the Grid database goes down? There go all your alerts. You would have to rely on a cronjob (or some other utility) to alert you that OEM Grid Control is down.
Thanks for the help. I will try and tweak my script.
What if your email system is down?1 person found this helpful
I suggest to use Grid Control to setup database alerts and perhaps use a cron task to fire an email if the grid control process is not running. Setting up alerts in cron to monitor Oracle software components is not very feasible. If you use Oracle 11g, check out Oracle Restart. Oracle Restart can be configured to automatically startup and shutdown Oracle components during a system restart or after a hardware or software failure.
I'm a little weary about what you're trying to do but, if I was to do it your way, I'd have the cron job dump the output to a file, then setup a different cron to mail you that file every hour (or whenever you'd like) with a summary of the info.
Thanks for the idea. Makes sense.
I will try that.