SNMP Traps

An SNMP Trap is a notification, that sends trap messages (Trap-PDU) from Didactum`s remote monitoring system (agent) to the network management base station (SNMP manager).
SNMP trap messages ver. 1 and 2c are supported (update 01/05/2014).

SNMP Traps are working only in conjunction with the integrated logics of your Didactum remote monitoring system. If the Trap is not defined in logics, a Trap will be not generated and no SNMP Trap message is sent.

Managing SNMP Traps

To create a Trap go to field ctlTrapRowStatus of ?tlTrapsTable table. When you install ctlTrapRowStatus in a state CreateAndWait(5) a new note is created in ctlTrapsTable table.

After creating a Trap you must specify the trap destination address in a field ctlTrapServer, destination port ctlTrapPort (default 162), version of the trap message ctlTrapVersion ("1" - ver. 1, "2" - ver. 2c), community ctlTrapCommunity.

As soon as you set up all the required parameters, you need to move field ctlTrapRowStatus in state active(1) and complete the installation of the Trap.

To create a Trap you can also set once all the fields in the table and move an element into an active state by setting the field ctlTrapRowStatus in state CreateAndGo(4).

To remove a Trap it is sufficient to move field ctlTrapRowStatus in state destroy(6).

Creating, editing, checking and removing the item Trap:

To read the Trap table of your Didactum remote monitoring system:

$ snmptable -Ci -Cb -v2c -cread 192.168.0.193 DIDACTUM-SYSTEM-MIB::ctlTrapsTable

1   SNMP table: DIDACTUM-SYSTEM-MIB::ctlTrapsTable

2

3   index ID ElementID         Server Port Version Community Value RowStatus

4   0  0       301 "192.168.0.10"  162     "1"  "public" "off"    active

To create a new trap in table:

1   $ snmpset -v2c -cwrite 192.168.0.193 DIDACTUM-SYSTEM-MIB::ctlTrapServer.1 s "host" \

2   DIDACTUM-SYSTEM-MIB::ctlTrapVersion.1 s "1" \

3   DIDACTUM-SYSTEM-MIB::ctlTrapCommunity.1 s "secret" \

4   DIDACTUM-SYSTEM-MIB::ctlTrapRowStatus.1 i createAndGo

1   DIDACTUM-SYSTEM-MIB::ctlTrapServer.1 = STRING: "host"

2   DIDACTUM-SYSTEM-MIB::ctlTrapVersion.1 = STRING: "1"

3   DIDACTUM-SYSTEM-MIB::ctlTrapCommunity.1 = STRING: "secret"

4   DIDACTUM-SYSTEM-MIB::ctlTrapRowStatus.1 = INTEGER: createAndGo(4)
 
To read the trap table just use 

$ snmptable -Ci -Cb -v2c -cread 192.168.0.193 DIDACTUM-SYSTEM-MIB::ctlTrapsTable

1   SNMP table: DIDACTUM-SYSTEM-MIB::ctlTrapsTable

2
 
3   index ID ElementID         Server Port Version Community Value RowStatus

4   0  0       301 "192.168.0.10"  162     "1"  "public" "off"    active

5   1  1       302         "host"  162     "1"  "secret" "off"    active

To send a test trap for a new trap element:

$ snmpset -v2c -cwrite 192.168.0.193 DIDACTUM-SYSTEM-MIB::ctlTrapValue.1 s "on"

DIDACTUM-SYSTEM-MIB::ctlTrapValue.1 = STRING: "on"

If the settings are correct, the trap will be delivered to your SNMP manager.
 
To remove Trap element:

$ snmpset -v2c -cwrite 192.168.0.193 DIDACTUM-SYSTEM-MIB::ctlTrapRowStatus.1 i destroy

DIDACTUM-SYSTEM-MIB::ctlTrapRowStatus.1 = INTEGER: destroy(6)

Description of  trap message:

When sending a trap message description line is formed in the body:

"Trap (name: <name>, ID: <id>) was worked"
 
where:

  • <name> - Trap element name in field ctlAllElementName of ctlAllElementsTable table;;
  • <id> - Trap element ID in field ctlAllElementID of ctlAllElementsTable table;

The name of trap is changed in table ctlAllElementsTable