A Dispatcher for Database Engine Alarms
Jon Alder and Ed Schaefer
What do you do if the database engine crashes at 3 a.m.?
You could wait
for a call from an irate user or you could have the
database engine
trigger an event to page you. Or what if your tape librarian
has trouble
remembering to secure last night's tape archive? You
could rely on the
librarian's memory or the database engine could trigger
an event to send
email informing the librarian when the archive is completed.
Informix has added just such an event-alarm facility
to their Online
Data Management System, version 6.0 and greater. The
event-alarm
facility calls a program or shell script pointed to
by the ALARMPROGRAM
configuration parameter and passes the event severity
as parameters.
Since the facility always calls the same program, that
program must be a
dispatcher controlling subsequent calls based on event
severity. This
article provides a dispatcher program.
Command-Line Arguments
When an event is triggered, Online calls the alarm program
and passes
five command-line arguments. From the Informix Online
Dynamic Server
Administrator's Guide, these arguments are defined as:
| Arg |
Parameter |
Data Type |
| 1 |
Event Severity |
Integer |
| 2 |
Event Class Id |
Integer |
| 3 |
Event Class Message |
String |
| 4 |
Event Specific Message |
String |
| 5 |
Event "see also" File |
String |
The Event Severity cases are:
| Severity |
Description |
| 1 |
Not noteworthy.
|
|