6.4.2 Threshold trapsThe SNMP traps sent out when a threshold violation occurs or ends can be edited at the Settings=>Thresholds=>Traps menu. The application only uses a trap defined here for a threshold if: · The SNMP trap attribute of the threshold is set · The type attribute of the threshold is set · If the violation occurs then this type has the SNMP Up Trap parameter set, if it ends then it has the SNMP Down Trap parameter set · The application is able to fill out at least one variable in the trap If the first condition is met but any of the other conditions isn’t met then the system will send out its default SNMP trap (see section 14.2.1). Figure 39. Threshold trap configuration I. Every trap has three main parameters: · Name: the unique name of the trap · SNMP Trap OID: the system sends out SNMPv2c traps and uses this value as the OID of the trap · Send empty values: if this option is set and the application is unable to fill out a trap element then it gives it a default value before sending the trap out. If this option isn’t set then the trap element will be left out from the trap. The default value used by the system depends on the type of the trap element: if it is a number (including the TimeTicks type) then it sends 0, if it is an OID then it sends 0.0, if it is an Octet String then it sends an empty string and if it is an IP address then it sends 0.0.0.0 During the creation of a new trap definition the elements of an already existing trap can be copied to the new trap using the “Copy trap elements from this trap” drop-down list. Every trap can contain more than one element: these will be in the trap in the same order as they appear in the trap definition. The elements can be edited with the [elements] link. The elements page shows the main parameters of the trap along with an “Example threshold” field. With the help of this field the user can choose an already existing threshold, and the application will show the actual values it would place into the trap would this threshold violate. Figure 40. Threshold trap configuration II. During the creation of a new trap element the following fields has to be filled in: · OID: the OID of the trap element, it has to be unique among the OIDs of the element belonging to the same trap. It the trap already has elements then the application will automatically fill in a value based on the OID parameter of the last element by increasing the last element of that OID · Type: the SNMP type of the element. If the trap already has elements then the application will automatically choose the type of the last element. The possible types are: o COUNTER64 o INTEGER o IPADDRESS o OBJECT_IDENTIFIER o OCTET_STRING o TIMETICKS o UNSIGNED32 · Object: the object represented in the trap element. If the trap already has elements then the application will automatically choose the object of the last element. The possible types: o Constant: the given value will be sent out Figure 41. Constant trap element o Threshold: a threshold attribute can be chosen Figure 42. Threshold trap element o Measurement: the measurement type needs to be selected first (you can use the “any measurement type” option as well). A threshold can have more than one measurement of the same kind in its expression (for example: “if traffic A > 10MB or traffic B > 10MB”), so the user has the possibility to choose between them with the “Measurement number” field. The application sorts the measurements by their name, so the measurement A in the previous example is the first and the B is the second. It is important to notice that this the number between the measurements with the same type. So for example if the previous expression would contain a CPU measurement called C then it would have the number 1 too. After this the user has to decide which object he wants to use: the measurement itself, its parent equipment, any of the parent site of its equipment or the complete site hierarchy Figure 43. Measurement trap element · Field: which field of the object has to be used. The possible values depend on the type of the object, while in case on a constant type this is a text field which contains the string to be sent Each element – if it isn’t a constant – has two other optional fields: a regular expression and a format parameter. With the help of the regular expression it is possible to check the value of the field or to split it up into several pieces. The format parameter can be used to modify/customize the data before sending it out: it can contain any text and with the help of the elements $1, $2, … it can contain the values of the match groups in the regular expression. For example if the threshold has a parameter with the value „switch1.intranet.company.local”, the expression is „([^.]+)” and the format is „Eq: $1”, then the value „Eq: switch1” will be sent out. |