33.1. ALARM resource

This resource manages alarms inside Abilis CPX. It permits to send SNMP traps notifications, Digital or Analog Input/Output line variation through emails or SMS to the configured recipients. Configuring the SMTP and SNMP resources is needed to send emails.

[Important]Important

The SMTP resource requires a separate licence in CPX.

For sending SMS is needed to have a UMTSBOX or CELLKEY device and to configure also the CTISMS resource.

[Important]Important

The CTISMS resource requires a separate licence in CPX.

It permits also to make an automatic call with the announcement of the current notification. The call is made from the CTIDISA resource. Configuring the CTIDISA call-back is needed to receive the voice notification to the phone. The played message in this call is the WELCOME and/or the INITDIAL, please see Section 51.8, “Message files”.

[Important]Important

The CTIDISA resource requires a separate licence in CPX.

[Tip]Tip

Interesting chapters:

Chapter 31, SMTP - Simple Mail Transfer Protocol;

Section 51.6, “Example of Call Back configuration”;

Chapter 53, CTISMS - CTI SMS resource;

Section 73.24, “Sending Alarm through a call”;

Section 73.25, “Sending Alarm through SMS”.

33.1.1. Activating the ALARM resource

Add the resource to the Abilis system with the following command.

[17:32:07] ABILIS_CPX:a res:alarm

COMMAND EXECUTED

The ALARM resource may already exist in the system, but may not yet be active: set it active with the following command.

[17:34:00] ABILIS_CPX:s act res:alarm

COMMAND EXECUTED
[Caution]Caution

You must save the configuration and restart the Abilis to make the resource running (use the command warm start to reboot the Abilis) after adding or setting the ALARM active.

[17:35:45] ABILIS_CPX:s p alarm act:yes

COMMAND EXECUTED

[17:35:51] ABILIS_CPX:d p alarm

RES:Alarm - Not Saved (SAVE CONF), Not Refreshed (INIT) -----------------------
Run    DESCR:Alarms_manager
       LOG:NO        ACT:YES            fifo-size:100    
       MAIL-FROM:AUTO (alarm@abilis_cpx)
       MAIL-RCPT:#
       MAIL-BODY:STANDARD
       SMS-SENDER:CP-PI             SMS-CDO:#
[Caution]Caution

Execute the initialization command init alarm to activate the changes made on the upper case parameters; use save conf and warm start commands to set active the changes made on the lowercase parameters.

33.1.2. ALARM resource parameters

Use the command below to display the parameters of the resource; the d p alarm ? command shows the meaning of parameters.

[17:42:10] ABILIS_CPX:d p alarm

RES:Alarm ---------------------------------------------------------------------
Run    DESCR:Alarms_manager
       LOG:NO        ACT:YES            fifo-size:100    
       MAIL-FROM:AUTO (alarm@abilis_cpx)
       MAIL-RCPT:#
       MAIL-BODY:STANDARD
       SMS-SENDER:CP-PI             SMS-CDO:#

Meaning of the parameters:

LOG

State changes log and alarm generation [NO, D, S, A, L, T, ALL] [+E] (D: Debug Log; S: System Log; A: Alarm view; L: Local audible alarm; T: SNMP traps; +E: Extended Log of state changes).

ACT

Operation activation [NO, YES].

fifo-size

Notifications fifo size [10..500].

MAIL-FROM

Sender of e-mail. "SYS" or "AUTO" or a valid e-mail address.

  • SYS: the mail sender configured in CTISYS 'MAIL-SENDER' is used;

  • AUTO: a fixed value is used (e.g. alarm@<cp-prompt>);

  • e-mail address: from 0 up to 128 ASCII printable characters.

MAIL-RCPT

Default e-mail recipient(s). "#" or up to 128 ASCII printable characters. Spaces are not allowed. Case is preserved.

MAIL-BODY

Default e-mail body type [STANDARD, SMS-LIKE].

SMS-SENDER

Text to be used as sender in SMS messages [CP-PI, SYSNAME, R-ID], where:

  • CP-PI: is the current value of Control Port 'PI' parameter;

  • SYSNAME: is the current value of General 'SYSNAME' parameter;

  • R-ID: is the current value of IP Router 'R-ID' parameter.

SMS-CDO

Default Outgoing called number for SMS. "#" or up to 20 digits optionally preceded by TON [u, i, n, o, s, h, c] and/or NP [x, e, d, t, l, p] attributes.

The following command allows the administrator to change the configuration of the resource:

s p alarm parameter:value...

[Caution]Caution

Execute the initialization command init alarm to activate the changes made on the upper case parameters; use save conf and warm start commands to set active the changes made on the lowercase parameters.

33.1.3. The ALARM table

The alarm table contains the rules to monitor Abilis resources. The table can store up to 20 rules ordered by the ID parameter.

33.1.3.1. Displaying the ALARM Table (D ALARM)

This command shows the alarm table. If ID is omitted, the command shows all routings.

[16:45:15] ABILIS_CPX:d alarm
-------------------------------------------------------------------------------
ID: |[DESCR:]
    |ENABLED:|RES:              |IO:         |TRIGGER: |ACTION:
    |MAIL-RCPT:
    |MAIL-RCPT-LIST:
    |MAIL-BODY:
    |SMS-CDO:
    |DISA-USER:                 |DISA-SERVICE:
    |DISA-CDO:                  |DISA-CGO:
-------------------------------------------------------------------------------
0    YES      Ip-3                            TRAP      MAIL
     - MAIL -------------------------------------------------------------------
     alarms@mydomain.com
     #
     SYS
-------------------------------------------------------------------------------

Meaning of parameters:

ID

Identifier of Alarms management rule [0..19].

ENABLED

Enable/disable this entry usage [NO, YES]. Default is NO.

RES

Resource for which the alarm/event is monitored. # or * or type-nnn or type-* or CtiP-nnn or CtiP-* or the name of a CPX resources list between single . Default is #. (e.g. * or Ip-* or CtiP-541 or Eth-1 or MFIO or 'mylist')

IO

Input/output line for which the alarm/event is monitored:

  • #: None Input/Output line;

  • D-IN-n, where 'n' can be:

    • for GPIO Digital IN line [1..64, *];

    • for MFIO Digital IN line, [1..7, *].

  • D-OUT-n, where 'n' can be:

    • for GPIO Digital IN line [1..64, *];

    • for MFIO Digital IN line, [1..7, *].

  • A-IN-n, where 'n' can be [1..16, *], for GPIO Analog IN line;

[Caution]Caution

Only for Gpio/MfIo resources.

[Tip]Tip

Interesting chapter: Chapter 14, IOBOX.

TRIGGER

Alarm/event to be monitored [NONE: None event type, TRAP: Snmp TRAP sent, ALARM-ON: Alarm switched ON, ALARM-OFF: Alarm switched OFF, ALARM-*: Alarm switched ON/OFF, ON: Digital Input/Output Line state ON, OFF: Digital Input/Output Line state OFF, LOW: Analog Input/Output Line state LOW, NORMAL: Analog Input/Output Line state NORMAL, HIGH: Analog Input/Output Line state HIGH, *: Input/Output Line state ON/OFF/LOW/NORMAL/HIGH]. 'ON', 'OFF', '*' are allowed only for Digital lines; 'LOW', 'NORMAL', 'HIGH', '*' are allowed only for Analog lines.

[Caution]Caution

TRAP, ALARM-ON, ALARM-OFF and ALARM-* are allowed only for IO equal to #; TRAP is allowed only for ACTION not equal to DISA-CB; ON, OFF, * are allowed only for Digital lines; LOW, NORMAL, HIGH, * are allowed only for Analog lines.

ACTION

Action to be executed when the monitored alarm/event occurs [NONE: No action has to be executed. The rule will be ignored; MAIL: E-mail must be sent; DISA-CB: CTIDisa call-back must be sent; SMS: SMS must be sent.]. Values can be joined using "," operator.

[Caution]Caution

DISA-CB is allowed only for TRIGGER not equal to TRAP.

MAIL-RCPT

E-mail recipient(s). "SYS" or "#" or up to 128 ASCII printable characters. Spaces are not allowed. Case is preserved. Only for ACTION:MAIL. Default is <empty>.

MAIL_RCPT-LIST

TXT list of e-mail recipients [#, ListName]. Only for ACTION:MAIL. Default is <empty>.

MAIL-BODY

E-mail body type [SYS, STANDARD, SMS-LIKE]. Only for ACTION:MAIL.

SMS-CDO

Outgoing called number for SMS. "SYS" or "#" or up to 20 digits optionally preceded by TON [u, i, n, o, s, h, c] and/or NP [x, e, d, t, l, p] attributes or the name of an IN list between single quotes (e.g. 'mylist'). Only for ACTION:SMS.

DISA-USER

Name of an existing CtiDisa user for DISA CallBack. "#" or up to 16 Alphanumeric extended characters. Case is preserved. Only for ACTION:DISA-CB.

DISA-PIN

User Personal Identification Number for DISA CallBack. "#" or up to 12 digits ['0'..'9']. Only for ACTION:DISA-CB.

DISA-SERVICE

Name of an existing CtiDisa service for DISA CallBack. "#" or up to 16 Alphanumeric extended characters. Case is preserved. Only for ACTION:DISA-CB.

DISA-CDO

Outgoing called number for DISA CallBack. "#" or up to 20 digits optionally preceded by TON [u, i, n, o, s, h, c] and/or NP [x, e, d, t, l, p] attributes. See HELP ISDN ATTRIBUTES for details on attributes. Only for ACTION:DISA-CB.

DISA-CGO

Outgoing calling number for DISA CallBack. "#" or up to 20 digits optionally preceded by TON [u, i, n, o, s, h, c] and/or NP [x, e, d, t, l, p] and/or PI [a, r, m, q] and/or SI [y, v, w, z] attributes. See HELP ISDN ATTRIBUTES for details on attributes. Only for ACTION:DISA-CB.

33.1.3.2. Adding an ALARM (A ALARM)

This command adds a new alarm to the table with ID:xx, setting the indicated parameters to the specified values. Unspecified parameters are set to default values. The table can store up to 20 rules, so the ID parameter must be in the range [0...19].

[18:06:34] ABILIS_CPX:a alarm id:0 enabled:yes trigger:trap res:* action:mail mail-rcpt:alarms@mydomain.com

COMMAND EXECUTED

[18:09:03] ABILIS_CPX:d alarm id:0

- Not Saved (SAVE CONF), Not Refreshed (INIT) ---------------------------------
-------------------------------------------------------------------------------
ID: |[DESCR:]
    |ENABLED:|RES:              |IO:         |TRIGGER: |ACTION:
    |MAIL-RCPT:
    |MAIL-RCPT-LIST:
    |MAIL-BODY:
    |SMS-CDO:
    |DISA-USER:                 |DISA-SERVICE:
    |DISA-CDO:                  |DISA-CGO:
-------------------------------------------------------------------------------
0    YES      *                  #            TRAP      MAIL
     - MAIL -------------------------------------------------------------------
     alarms@mydomain.com
     #
     SYS
-------------------------------------------------------------------------------
[Warning]Warning

To activate the changes made on the ALARM table, execute the initialization command init alarm. Remember to save the configuration (save conf).

33.1.3.2.1. Adding an ALARM for a specified resource

This command adds a new alarm to the alarm table only for resource TRFA.

[18:06:34] ABILIS_CPX:a alarm id:1 enabled:yes trigger:trap res:trfa action:mail mail-rcpt:alarms@mydomain.com

COMMAND EXECUTED

[18:09:03] ABILIS_CPX:d alarm id:1

- Not Saved (SAVE CONF), Not Refreshed (INIT) ---------------------------------
-------------------------------------------------------------------------------
ID: |[DESCR:]
    |ENABLED:|RES:              |IO:         |TRIGGER: |ACTION:
    |MAIL-RCPT:
    |MAIL-RCPT-LIST:
    |MAIL-BODY:
    |SMS-CDO:
    |DISA-USER:                 |DISA-SERVICE:
    |DISA-CDO:                  |DISA-CGO:
-------------------------------------------------------------------------------
1    YES      TRFA               #            TRAP      MAIL
     - MAIL -------------------------------------------------------------------
     alarms@mydomain.com
     #
     SYS
-------------------------------------------------------------------------------
[Warning]Warning

To activate the changes made on the ALARM table, execute the initialization command init alarm. Remember to save the configuration (save conf).

[Tip]Tip

To configure a TRFA Trap, refer to: Section 44.2, “TRFA Traps”

33.1.3.3. Deleting an ALARM (C ALARM)

It clears the alarm with the specified ID.

[18:33:33] ABILIS_CPX:d alarm

-------------------------------------------------------------------------------
ID: |[DESCR:]
    |ENABLED:|RES:              |IO:         |TRIGGER: |ACTION:
    |MAIL-RCPT:
    |MAIL-RCPT-LIST:
    |MAIL-BODY:
    |SMS-CDO:
    |DISA-USER:                 |DISA-SERVICE:
    |DISA-CDO:                  |DISA-CGO:
-------------------------------------------------------------------------------
0    YES      *                  #            TRAP      MAIL
     - MAIL -------------------------------------------------------------------
     alarms@mydomain.com
     #
     SYS
-------------------------------------------------------------------------------

[18:33:36] ABILIS_CPX:c alarm id:0

COMMAND EXECUTED

[18:34:00] ABILIS_CPX:d alarm

-------------------------------------------------------------------------------
ID: |[DESCR:]
    |ENABLED:|RES:              |IO:         |TRIGGER: |ACTION:
    |MAIL-RCPT:
    |MAIL-RCPT-LIST:
    |MAIL-BODY:
    |SMS-CDO:
    |DISA-USER:                 |DISA-SERVICE:
    |DISA-CDO:                  |DISA-CGO:
-------------------------------------------------------------------------------
                         *** ALARM TABLE IS EMPTY ***    
[Warning]Warning

To activate the changes made on the ALARM table, execute the initialization command init alarm. Remember to save the configuration (save conf).

33.1.3.4. Modifying the ALARM Table (S ALARM)

This command sets the parameters of the rule identified by “ID:xx” to their new values. The syntax of the command is: s alarm id:xxx [par:value].

[18:38:54] ABILIS_CPX:d alarm

- Not Saved (SAVE CONF), Not Refreshed (INIT) ---------------------------------
-------------------------------------------------------------------------------
ID: |[DESCR:]
    |ENABLED:|RES:              |IO:         |TRIGGER: |ACTION:
    |MAIL-RCPT:
    |MAIL-RCPT-LIST:
    |MAIL-BODY:
    |SMS-CDO:
    |DISA-USER:                 |DISA-SERVICE:
    |DISA-CDO:                  |DISA-CGO:
-------------------------------------------------------------------------------
2    NO       *                  #            TRAP      MAIL
     - MAIL -------------------------------------------------------------------
     alarms@mydomain.com
     #
     SYS
-------------------------------------------------------------------------------

[18:38:58] ABILIS_CPX:s alarm id:2 enabled:yes

COMMAND EXECUTED

[18:41:42] ABILIS_CPX:d alarm

- Not Saved (SAVE CONF), Not Refreshed (INIT) ---------------------------------
-------------------------------------------------------------------------------
ID: |[DESCR:]
    |ENABLED:|RES:              |IO:         |TRIGGER: |ACTION:
    |MAIL-RCPT:
    |MAIL-RCPT-LIST:
    |MAIL-BODY:
    |SMS-CDO:
    |DISA-USER:                 |DISA-SERVICE:
    |DISA-CDO:                  |DISA-CGO:
-------------------------------------------------------------------------------
2    YES      *                  #            TRAP      MAIL
     - MAIL -------------------------------------------------------------------
     alarms@mydomain.com
     #
     SYS
-------------------------------------------------------------------------------
[Warning]Warning

To activate the changes made on the ALARM table, execute the initialization command init alarm. Remember to save the configuration (save conf).

33.1.4. ALARM diagnostic, statistics and debug

33.1.4.1. ALARM diagnostic

The following command is used to display the diagnostics of the ALARM resource:

d d alarm

it shows the state of the resource (STATE), the number of current rules(RULES-CUR),the number of active rules(RULES-ACT), the number of notifications inside the FIFO (FIFO-CUR), the maximum number of notifications inside the FIFO (FIFO-PEAK), the maximum number of notifications which can be managed by the FIFO (FIFO-MAX).

[12:13:10] ABILIS_CPX:d d alarm

RES:Alarm ---------------------------------------------------------------------
       Alarms_manager                                                          
       STATE:ACTIVE    
       RULES-CUR:5      RULES-ACT:2      RULES-MAX:20     
       FIFO-CUR:0       FIFO-PEAK:15     FIFO-MAX:100

33.1.4.2. ALARM statistics

The following commands are used to display the statistics of the ALARM resource:

d s alarm

it shows the statistics of the ALARM resource like: the number of received notifications (ALARM), the number of notifications successfully inserted in the FIFO (ALARM-SUCC), the number of notifications not inserted in the FIFO because the it's full (ALARM-OVR), the number of notifications not inserted in the FIFO for any other reason(ALARM-FAIL), the number of trap notifications extracted from FIFO (TRAP), the number of sent mails (MAIL), the number of successfully sent mails (Succ.), the number of mails (Fail) whose sending is failed, the number of DISA CallBack (DISA-CB),the number of sent SMS(SMS).

[12:14:52] ABILIS_CPX:d s alarm

RES:Alarm ---------------------------------------------------------------------
       Alarms_manager                                                          
       --- Cleared 2 days 22:44:54 ago, on 24/04/2015 at 13:54:25 -------------
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       ALARM      |         28|         28|ALARM-OVR  |          0|           |
       ALARM-SUCC |         28|         28|ALARM-FAIL |          0|          0|
       ------------------------------------------------------------------------
       -----------+-----------+-----------+-----------|
       Trigger    |   Succ.   |   Fail    |   Total   |
       -----------+-----------+-----------+-----------|
       TRAP       |          0|          0|          0|
       ALARM-ON   |          0|          0|          0|
       ALARM-OFF  |          0|          0|          0|
       ON         |          0|          0|          0|
       OFF        |         28|          0|         28|
       LOW        |          0|          0|          0|
       NORMAL     |          0|          0|          0|
       HIGH       |          0|          0|          0|
       -----------+-----------+-----------+-----------|
       Action     |   Succ.   |   Fail    |   Total   |
       -----------+-----------+-----------+-----------|
       MAIL       |          0|          0|          0|
       DISA-CB    |          0|          0|          0|
       SMS        |          0|          0|          0|
       -----------+-----------+-----------+------------

33.1.4.3. ALARM debug

Type the following command to view the commands allowed:

[15:36:09] ABILIS_CPX:debug res:alarm

RES:Alarm ---------------------------------------------------------------------
       Alarms_manager                                                          
       BufferLength:64512  Date/Time:02/08/2016 15:44:23 TraceTime:5630259

USAGE:
 LSN == 0         : This help message
 LSN == 1         : Alarms manager statistics
 LSN == 2         : Display alarms trace information.
 LSN == 3         : Display only alarms/event for which a matching rule
                    has been found.
 LSN == 3 CMD:ALL : Display full alarms trace content.
 LSN == 3 CMD:CLR : Clear alarms trace
 LSN == 101       : ALARM-ON simulation from Ctip-31
 LSN == 102       : ALARM-OFF simulation from Ip-1
 LSN == 103       : IO-ON simulation from GPIO-1 IO:D-IN-8
 LSN == 104       : IO-OFF simulation from MFIO-1 IO:D-OUT-3
 LSN == 105       : IO-LOW simulation from GPIO-1 IO:A-IN-2
 LSN == 106       : IO-NORMAL simulation from GPIO-1 IO:A-OUT-1
 LSN == 107       : IO-HIGH simulation from GPIO-1 IO:A-IN-16
 LSN == 113       : TRFA Ip trap: Ip-1 Throughput OUT 5Min Threshold Reached
 LSN == 114       : TRFA Ip trap: Ip-50 Ttaffic TOT Month Threshold Reached
 LSN == 115       : TRFA Cti trap, user:admin 5Min. Busy (In) Threshold Reached
 LSN == 116       : TRFA Cti trap, service:serv5 Now Waiting Threshold Reached
 LSN == 117       : TRFA Cti trap, number:prova Now Waiting Threshold Reached
 LSN == 118       : TRFA Cti trap, user:admin 5Min. Busy (In) Threshold Left
 LSN == 119       : TRFA Cti trap, service:serv5 Now Waiting Threshold Left
 LSN == 120       : TRFA Cti trap, number:prova Now Waiting Threshold Left
[Note]Note

To use these commands you need to have administrator or super user rights.

Type the following command to display only alarms/event for which a matching rule has been found:

[15:44:23] ABILIS_CPX:debug res:alarm lsn:3

RES:Alarm ---------------------------------------------------------------------
       Alarms_manager                                                          
       BufferLength:64512  Date/Time:02/08/2016 15:45:30 TraceTime:5696453

Legend of possible 'Result' values and meanings:
- No rule : no rule found matching received notification.
- Ok      : rule found, executed action successful.
- Fail    : rule found, executed action failure.
- Bad     : rule found with incomplete/bad content. Action not executed.

-------------------+------------------+-------+----+----------------+--------------
Loc. Date and Time |Res/Ctip [IO]     |Trigger|Rule|Action(s)       |Result(s)
-------------------+------------------+-------+----+----------------+--------------
02/08/2016 14:10:32|MfIo      D-OUT-2 |OFF    |  2 |MAIL            |Ok
02/08/2016 14:10:34|Ip-1              |ALM-ON |  3 |MAIL            |Ok

Type the following command to display full alarms trace content:

[15:48:19] ABILIS_CPX:debug res:alarm lsn:3 cmd:all 

RES:Alarm ---------------------------------------------------------------------
       Alarms_manager                                                          
       BufferLength:64512  Date/Time:02/08/2016 15:48:27 TraceTime:5873316

Legend of possible 'Result' values and meanings:
- No rule : no rule found matching received notification.
- Ok      : rule found, executed action successful.
- Fail    : rule found, executed action failure.
- Bad     : rule found with incomplete/bad content. Action not executed.

-------------------+------------------+-------+----+----------------+--------------
Loc. Date and Time |Res/Ctip [IO]     |Trigger|Rule|Action(s)       |Result(s)
-------------------+------------------+-------+----+----------------+--------------
02/08/2016 14:10:32|MfIo      D-IN-1  |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-IN-2  |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-IN-3  |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-IN-4  |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-IN-5  |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-IN-6  |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-IN-7  |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-OUT-1 |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-OUT-2 |OFF    |  2 |MAIL            |Ok
02/08/2016 14:10:32|MfIo      D-OUT-3 |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-OUT-4 |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-OUT-5 |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-OUT-6 |OFF    | -- |                |No rule
02/08/2016 14:10:32|MfIo      D-OUT-7 |OFF    | -- |                |No rule
02/08/2016 14:10:34|Ip-1              |ALM-ON |  3 |MAIL            |Ok
02/08/2016 14:10:34|Ip-2              |TRAP   | -- |                |No rule
02/08/2016 14:10:34|Eth-2             |TRAP   | -- |                |No rule
02/08/2016 14:10:38|Ip-2              |TRAP   | -- |                |No rule