NCSS Alarm Configuration

The NCSS uses a spreadsheet to drive the configuration of its alarm system. The spreadsheet is a format that is easy for seismologists to handle; in CSV format it is a convenient input for scripts. The spreadsheet and scripts for this configuration system are kept /home/u2/ncss/AlarmConfig/.

There are two sheets to the spreadsheet, with meaningful names: Alarm Rules and Regions. The Regions sheet is basically free-form, and provides the latitude and longitude of the various geographic regions used by the alarm rules. Currently the only way to get from the Regions sheet to the alarmdec_regions.cfg is by manual copy. Since the regions change very infrequently, there has been no effort to automate this process.

The Alarm Rules sheet is where the action is. It contains information and comments about all the alarm rules, for both the real-time and post-processing systems. In CSV format, it gets processed by the perl script genAlarmConf. This script expects several conventions to be followed by the Alarm Rules sheet.

Revised 2018/02/23

The following columns are required by genAlarmConf:

The remaining column names are optional, although several of them are used in pairs: if one of a pair is present the other must also be present. These must correspond to the available alarm criteria in alarmdec. The genAlarmConf script does not check this. But you will get an error from alarmdec if you include criteria names it does not understand. For any criteria (or pair) where no value is given in the spreadsheet, that criteria will not be used to evaluate the event; effectively all values are allowed.

Procedure

Once the alarm spreadsheet has been approved by seismologists and appropriate management, it should be saved in /home/u2/ncss/AlarmConfig/. Be sure to set the revision date (first row in the spreadsheet) to the correct date. Save the Alarm Rules sheet as a CSV (comma-separated-values) file.

If any existing alarm configuration files are in the above directory, move them aside or they will be overwritten. Note that files with names starting with SAVE should not be removed or renamed: they are not created by the genAlarmConf script.

Run the genAlarmConf script to generate the new configuration files as follows:

genAlarmConf -b bp_comments <CSV FILE>

This command will report any errors it encounters, and a summary of its results. If all goes OK, the complete set of alarmdec rules files as well the alarmact_actions.cfg file will be generated.

In the current alarm spreadsheet, rules files named alarmdec-pp*.cfg are for the post-processing alarm systems; all other alarmdec-*.cfg files are for the real-time alarm systems; and alarmact_actions.cfg is for both real-time and post-processing alarm systems.

All these configuration files should be copied to the /home/ncss/run/params directories on the appropriate systems. Then alarmact and each of the alarmdec programs should be restarted.