Nav

Defining Notifications and Destinations

Once you’ve defined your alerts, you can create email or SNMP destinations to send them to. Notifications configure which alerts are sent to which destination. For example, if you wanted to send all fatal alerts to ops@mulesoft.com, you could create an email destination with your SMTP server and then configure a notification to send fatal alerts to that email address using the SMTP server defined in the destination.

Setting Up Alert Destinations

You can set up alert destinations, which are the locations notified when alerts are triggered. You need to set up destinations prior to creating any notifications, since notifications are associated with specific destinations. Setting up a notification is described in the following section.

Click the Destinations node in the navigation tree to see currently defined destinations. The pane displays the user-supplied name of the destination and the destination type, either email or SNMP.

viewdest

Click the Add button to create a new destination. The Add Alert Destination pane opens. You start by entering a name for the destination and selecting the destination type. From the Type pull-down list, select the type of destination: email or SNMP.

Depending on the destination type you select, you are prompted for additional fields.

Configuring Email Destinations

When adding an email-type destination, you must designate server and the recipient user information.

addemaildest

For an email destination, you need to specify the following:

  • SMTP server designation: You can identify the SMTP server by its IP address, such as 192.168.0.1, or by its url, such as smtp.mycompany.com.

  • SMTP server port number: The server port number, such as 25.

  • User email name: The email name and address for the recipient, such as user@mycompany.com.

  • Password: The recipient’s email password.

Check the TLS/SSL box if the server requires a secure environment. You must set this field to conform to your SMTP provider’s server configuration.

When finished, click Save to complete adding the destination.

Examples of Email Destinations

The following examples show how you set up email destinations for Google and Yahoo mail recipients.

For Google mail (gmail), set the fields as follows:

Field Input Data

Name

Name of the alert destination

Type

Email

SMTP Server

smtp.googlemail.com

SMTP Port

465

Username

<username>@gmail.com

Password

<email password>

Use TLS/SSL

Yes

For Yahoo mail, set the fields as follows:

Field Input Data

Name

Name of the alert destination

Type

Email

SMTP Server

smtp.mail.yahoo.com

SMTP Port

465

Username

<username>

Password

<email password>

Use TLS/SSL

Yes

Configuring SNMP Destinations

SNMP-type destinations have different fields than email-type destinations. The figure below is an example of how you might set up an SNMP destination:

adddest

Specify the following for SNMP destinations:

  • OID: An identifying name for the destination. The OID you enter needs to conform to SNMP conventions. For example, a valid OID might be 1.3.6.

  • Local address: The local SNMP address to which to bind the destination. The address must conform to SNMP conventions. An example of a local address might be udp:127.0.0.1/40162.

  • Target address: The SNMP target address to which to send the alert notification. This address also must conform to SNMP conventions. For example, you might enter an address such as udp:127.0.0.1/40163.

When finished, click Save to complete adding the destination.

To edit a destination, double-click the destination entry in the Alert Destinations pane. The edit pane displays the data entered for that destination and you can change values as needed.

Specifying Notifications

Set up notifications after you have defined possible destinations for your notifications. When you create a new notification, you must specify a destination for the notification, and the destination must already exist.

Click the Notifications node in the navigation tree to view alert notifications that are already defined. The pane displays the names of all alert notifications and their destinations.

To create a new notification, click the Add button to open the Add Alert Notification pane.

add1notify

Enter a name for the notification. You also need to specify one or more filters. When you click the Add button in the middle of the pane, the pane displays a table into which you specify the filter field(s) and values for these field. You may add as many filter fields as you like. Select each filter field from the Field pull-down menu. The Value pull-down menu displays the values that correspond to the selected field. (The figure below is an example of this.)

addfilter

For each filter field you specify, be sure to click the Save button beneath the Field/Values table to save that filter, or click Cancel to discard the entry. You can select filter fields and delete them, if you want. Add additional filters by clicking the Add button, but be sure you click Save or Cancel before specifying these additional filter fields.

For each notification, you must select the destination from the Destination pull-down list. If you have not yet defined a destination, then this list is empty and you cannot complete the notification specification.

adddestfilter

If the destination type you select is email, then the pane prompts you for the email recipient name, the name of the sender, a subject, and text for the body of the email. You must enter data for all these fields (See the figure below.)

destination-email

For email destinations, you may use an expression in the subject and body fields. To use an expression and have it correctly interpreted, you must enclose the expression in curly braces and precede it with a dollar sign ($) symbol, as shown below. For example:

${expression}

You can combine the expression with some other text. For example, you might want a subject line that displays a standard message that an alert has been triggered but also includes an expression indicating the alert condition. You might set the subject field as follows:

See below for more information on properties that you can use with these alert expressions.

When the destination type is SNMP, you are prompted just for a value, as shown below. You must enter data for the Value field to be able to save the notification.

expressionsalerts

For all notifications, be sure to click the Save button after you have entered all required data. Notice that the Save button is grayed out until all required fields are completed.

To edit a notification, double-click the notification entry in the Alert Notifications pane. The edit pane displays the data entered for that notification and you can change values as needed.

Properties Used in Alert Expressions

There are a number of properties whose values you can incorporate into alert destinations and notifications. You incorporate these properties using the expression syntax shown above. Some properties are common to all alert types, while others pertain to specific alert types.

The following properties are common to all alert types. (The class com.mulesoft.console.alert.RaisedAlert contains the declaration of alert properties.)

Property Description

id

Service identifier

name

Service name

serverId

Server identifier (currently not available in 2.2.6 release)

serverName

Server name (currently not available in 2.2.6 release)

description

Description of the raised alert

timestamp

Time when the alert was raised

source

Source of the raised alert

severity

Severity of the alert, such as Fatal or Critical

type

The type of the alert, such as Low Memory or Exception