User's Guide
Lucky Vidmar
May 7, 2003
INTRODUCTION
System Overview
The Earthworm Alarms System is intended to satisfy the need for an easy-to-use, web-centered method for dispatching notifications about automatic and reviewed earthquakes. The initial requirements are that the system must support several delivery mechanisms such as email, pager, and QDDS. Furthermore, the user must be able to specify and modify the text of the notification messages. The system must keep an audit of all notifications that were sent, and this audit should be used to ensure that subsequent alarms are sent to the same list of recipients who received the original notification.
The system is comprised of an Oracle database, SQL and C source code which allows for manipulation of the database objects, web server resident C source code which processes web forms, and an Earthworm configuration with a ring onto which alarms messages are written and from which alarms processing modules actually execute alarm notifications. See below for more details on the system setup.
This document is intended for the target user of the system, one who has a managerial decision capacity to define who will receive what types of alarm notifications. The user should also be familiar with Earthworm as well as with the Earthworm Quick Review (EQR) system.
Glossary Notes
Format. The Earthworm Alarms System allows flexibility in defining and modifying the formats in which alarms messages are delivered. Using the Formats Manager (see below for more details) each format is assigned two message templates: insertion and deletion. The Formats Manager uses a token-based template to allow easy definition of new formats. Each token is bracketed by the ~ character, and each format definition must end with the ~End~ token. The system then replaces each token with the particular value associated with the event which caused the event to be issued:
The following tokens are currently recognized:
Criteria Program. A Criteria Program (CP) is simply one
attribute of the alarm specification. It is a program written in any language,
invoked by the alarms system. It is passed information about the event
and it signals back to the caller whether the event passed some set of
criteria defined and checked by the program. CP?s are specified in the
Program
Manager (see below for more details).
WEB FORMS
The main component of the system is a sequence of web forms which interact with the database allowing the user to manage recipients, formats, and criteria programs.
Alarms Manager
The Alarms Manager web form is the starting point of the system. It is divided into three areas allowing the user to add or modify recipients, formats, and criteria programs. Each area presents a list of previously defined entries (if any) as well as the option to define a new entry. To create a new entry, the user highlights the choice for a new entry (New Recipient, New Format, New Program) before clicking Submit. To view, modify, or delete an existing entry, the user highlights the desired entry and clicks Submit. By clicking Submit, the user enters the relevant sub-manager area, i.e., Recipient Manager, Format Manager, or Program Manager, described below in more detail.
The Format area also allows the user to preview a previously defined format by highlighting a format in the list and then clicking on Preview. In this case, the insertion and deletion templates will be shown with the recognized format tokens highlighted in red.
Recipient Manager
The Recipient Manager allows for adding, deleting, and modifying rules which trigger alarms. Each rule consists of the following attributes:
Here, the user will be prompted for further information based on the delivery mechanisms desired, such as the recipient?s email address, phone number, or QDDS target directory.
Clicking Submit will insert the recipient and all defined rules into the database.
The Recipient Manager can also be invoked for a previously defined recipient. In this case, the web form will show all rules defined for the recipient along with blank spaces for five more rule definitions. Along with the Submit button, which acts as described above, there is a Delete button which will delete the current recipient and all associated rules from the database. Furthermore, in this mode each individual rule can be deleted by clicking the Delete Rule checkbox. The attributes of each existing rule can also be changed by changing the magnitude limit, or selecting a new or different delivery method and format before clicking Submit.
If Delete Recipient is clicked, a confirmation form is shown where the user must click Continue to actually delete the rules from the database.
Note: the system does not enforce any content-based constraints on the rule attributes. Therefore, it is up to the user to correctly match the delivery mechanism with the desired message format (e.g., messages delivered by QDDS should typically be in CUBE format).
Format Manager
Each format has three required attributes:
Note: The user must specify both the Insertion Format and Deletion Format.
Note: the CUBE format is pre-defined in the source code and can only be changed by modifying source code.
Program Manager
A criteria program (CP) is a program written in any language, invoked by the alarms system. It checks the information about an event against any predetermined set of criteria, such as magnitude range, location, type, and even trends or swarms.
Each CP has three required attributes:
Criteria programs are stand-alone programs. This causes some challenges
with respect to communication to the rest of the alarms system. Each CP
is executed as a stand-alone program and it writes its results to a file
in the temporary program directory where the alarms system knows to look
for those results. Therefore, the directory specified by ProgramDir
attribute must be writeable to the web server application.
SYSTEM SETUP
The system is comprised of an Oracle database, SQL and C source code which allows for manipulation of the database objects, web server resident C source code which processes web forms, and an Earthworm configuration with a ring onto which alarms messages are written and from which alarms processing modules actually execute alarm notifications.
The installation and setup of the Oracle database is beyond the scope of this document. This section assumes that Oracle has been installed and that the latest version of the Earthworm DBMS schema has been successfully loaded.
Because the Quick Review system is closely related to the alarms system,
reference to the EQR documentation is recommended.
Configuration Files
The Alarms System uses two configuration files:
In order for alarm notifications to be issued and delivered, an Earthworm construction must be running on the web-server host. At the minimum, it must contain one ring into which the EQR system writes alarms messages, and one or more delivery modules.
The following message types are currently supported:
TYPE_EMAIL_MSG
<email address>
<mail server>
<subject line text>
<database ID of the audit associated with the alarm>
<text of the alarm message>
TYPE_QDDS_MSG
<target directory>
<database ID of the audit associated with the alarm>
<text of the alarm message>
TYPE_CUSTOM_MSG
*** Format not yet defined ***
TYPE_PAGER_MSG
*** Format not yet defined ***
The following two delivery modules are currently available: