RE: Alert Once Functionality.

  • From: "Allen, Brandon" <Brandon.Allen@xxxxxxxxxxx>
  • To: <niall.litchfield@xxxxxxxxx>, "Oracle-L Freelists" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 17 Apr 2007 12:08:05 -0700

For some of our monitoring, we use HP OpenView, which is configured to
fire the alert only once and then it will just wait in the console until
someone does something about it, or it detects on its own that the
problem has been resolved.
 
We also have a perl script monitoring our alert logs and the script
keeps an array of every error message it reads and the last time that
message was read and then checks that time against the current time to
see if the specified time-out value has been exceeded or not.  If it
has, then it sends the alert again, and updates the last-alerted time so
that the alert won't get fired again until the time-out has elapsed
again.  The code looks something like this:
 
 
my(@msgs)       = ();
%error_log              = ();
$TIME_OUT               = 900;

while (<ALERT_LOG>) {
 
. . .
 
elsif (/^\s*(ORA|OER)-(\d+)/i) {
 
    if ((not defined $error_log{$_})  ||
            (time() - $error_log{$_} >= $TIME_OUT)) {
            &send_mail("[ALARM] Severe Errors:$ORACLE_SID", $PAGER,
@msgs);
            $error_log{$_}  = time();
 
 
I didn't write it, so I can't take credit for it, nor can I share it
entirely.
 
Regards,
Brandon


Privileged/Confidential Information may be contained in this message or 
attachments hereto. Please advise immediately if you or your employer do not 
consent to Internet email for messages of this kind. Opinions, conclusions and 
other information in this message that do not relate to the official business 
of this company shall be understood as neither given nor endorsed by it.

Other related posts: