Configure an alarm

About this task

An alarm is used to send a notification when an exception occurs. The alarm definition specifies how a notification should be sent if an exception occurs. When a user defines a flow to schedule work, they can select an alarm to open if an exception occurs. They select an alarm from a configured list of alarms. Alarms are configured by the Process Manager administrator.

Alarms are stored in the directory JS_TOP/work/alarms. Each alarm is in a separate file named alarm_name.alarm. The file name and its contents are case-sensitive. Each alarm can either notify one or more email addresses, or execute a script.

The alarm file contains the following parameters:

DESCRIPTION=<description> 
NOTIFICATION=CMD[command_name command_parameters]

Any alarm files with an invalid alarm definition will not be registered. Any extra unrecognized parameters are ignored, but the alarm will still be registered.

Procedure

  1. As the Process Manager administrator, create a new file in the directory JS_TOP/work/alarms. Specify a name for the file that is a meaningful name for the alarm, with a file suffix of alarm. For example:
    DBError.alarm
    

    The name you specify will appear in the Flow Editor in the list of available alarms.

  2. Optional. Specify a meaningful description for the alarm. For example:
    DESCRIPTION=Send DBA a message indicating DBMS failure
    
  3. Required. Specify the alarm type and definition.
    • Email notification

      NOTIFICATION=Email[user_name ...]
      

      Specify the "Email" command, followed by a space-delimited list of email addresses to notify regarding the exception. Specify the complete email address, or just the user name if JS_MAILHOST was defined in js.conf. For example:

      NOTIFICATION=Email[bsmith ajones]
      

      You must specify a valid notification statement with at least one email address, or the alarm is not valid.

    • Script execution

      NOTIFICATION=CMD[/file_path/script_file user_variable ...]
      

      Specify the "CMD" command, followed by the path to the script file and any user variables (such as the error code). For example:

      NOTIFICATION=CMD[/home/admin/pageadmin.sh #{ERRORCODE}]
      

      Variable values cannot contain the backquote character ().

  4. To enable the alarm, reload the alarm list using the following command:

    jreconfigalarm