6.4.3 Threshold custom e-mailThe e-mail messages sent out when a threshold violation or SNMP trap / SYSLOG event occurs or ends can be edited at the Settings=>Thresholds=>Custom e-mail menu. The application only uses an e-mail defined here for a threshold or event if: · The e-mail attribute of the threshold or the event definition is set · The type attribute of the threshold or event definition is set · If the violation or event occurs then this type has the Alarm e-mail parameter set, if it ends then it has the Clear e-mail set · The application is able to fill out at least one variable in the e-mail · In case of a threshold violation the e-mail address is configured to receive one e-mail for each alarm notifications (i.e. “Bulk threshold e-mail sending” is not set) If the first condition is met but any of the other conditions isn’t met then the system will send out its default e-mail message. Figure 44. Threshold e-mail configuration I. Every e-mail has five main parameters: · Name: the unique name of the e-mail · E-mail subject field: it is either set to default or a custom subject field is specified. The e-mail elements (see later) can also be placed in the subject field using either of the following ways:
Example subject field value: ${Equipment name} ${Measurement name} $In and $Out ! · Send empty values: if this option is set and the application is unable to fill out an e-mail element then it is sent with an empty value, otherwise it is left out from the e-mail. · Prefix and postfix: PVSR will add these two to the email without any modification, so for example if the value of the prefix parameter is “<Center><h1><b>Heading 1<h1></center>” then the email will begin with something like this: Heading 1 If the Prefix contains the text “<!--PVSR_PLAINTEXT-->” then PVSR will send out a plain text message instead of a formatted HTML page. · Prefix and postfix for Unknown thresholds: these are the same as the previous prefix and postfix fields, except that those are only used for Critical-Major-Warning-Minor thresholds and these are only used for Unknown thresholds During the creation of a new e-mail definition the elements of an already existing e-mail can be copied to the new e-mail using the “Copy trap elements from this e-mail” drop-down list. Every e-mail can contain more than one element: these will be in the e-mail in the same order as they appear in the e-mail definition. The elements can be edited with the [elements] link. The elements page shows the main parameters of the e-mail 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 e-mail would this threshold violate. Figure 45. Threshold e-mail configuration II. During the creation of a new e-mail element the following fields has to be filled in: · Name: the name of the element. The elements appear in a table in the e-mail, and this parameter is used in the first column of that table · Object: the object represented in the element. If the e-mail 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 46. Constant e-mail element o Threshold: a threshold attribute can be chosen. If the email is sent out because of an event then the appropriate event definition or event parameter will be used Figure 47. Threshold e-mail 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. In contrast: an event might only have maximum one measurement, but it might have no measurement at all (even in this case the event might be associated with an equipment). 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 48. Measurement e-mail 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. In case of a measurement object the user can also choose “Chart” here in which case PVSR will place the chart of the measurement into the email 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. |