- Click on the Triggers tab.
- Click Add.
The Add New Trigger Rule-Select attribute selection trigger dialog box appears (Figure 3-1).

- Drill down to locate the attribute on which you want to trigger, as shown in the example in Figure 3-2.

- Click Next.
The Add New Trigger Rule-Set condition for triggering dialog box appears (Figure 3-3).

In this dialog box, you set the properties that define when the rule will be triggered; for example, the threshold at which the rule is invoked and for how long the triggering condition should be sustained before invoking the trigger action.
- Fill in the fields as described on Table 3-1.
Table 3-1 Set Condition for Triggering Field Descriptions
|
|
|
|
|
The maximum value at which point the rule should be triggered
|
|
|
The duration, in seconds (s), that the triggering condition must be met for the action to trigger.
|
|
|
The minimum time, in seconds (s), between consecutive triggers.
|
Trigger on descending flank (checkbox)
|
Whether you want the action to be triggered when the attribute reaches the trigger value from a higher value; for example, if the trigger value is 80 and attribute value descends from 100 to 80, the notification will be triggered.
|
Trigger on ascending flank (checkbox)
|
Whether you want the action to be triggered when the attribute reaches the trigger value from a lower value; for example, if the trigger value is 80 and attribute value ascends from 60 to 80, the notification will be triggered.
|
- Click Next.
The Add New Trigger Rule-Select Action dialog box appears (Figure 3-4).

Use this dialog box to identify the type of action you want to occur when a notification is sent. You have a choice of five options:
- Send an alert to the application
- Send a warning to standard output
- Send an e-mail to a specific recipient
- Start a JRA recording
- Create a thread stackdump.
- Select the action you want performed. Depending on the action you select, you might have to enter additional data, as described on Table 3-2.
Table 3-2 Selecting a Notification Action
|
|
|
|
|
Print a notification in The Trigger Alerts Dialog Box. Please refer to Viewing Individual Alerts for an example of this kind of action.
|
|
|
Print a notification on the console ( system.out).
|
|
|
Send an e-mail to a specified user. If you select this option, you will need to enter the following data in the fields that appear:
- To (the e-mail recipient).
- CC (anyone-aside from the recipient-to whom you want to send the e-mail).
- BCC (anyone-aside from the recipient-to whom you want to anonymously send the e-mail).
|
|
|
Create a JRA recording of the application run. If you select this option, you will need to enter the following data in the fields that appear:
- The type of sampling you want; that is, what will be sampled (garbage collection, method, or native).
- The duration of the JRA recording.
- The name of the file to which the JRA should write the results of the JRA recording.
|
|
|
Create a thread stackdump and log it to a file or display it as an application alert. If you select this option, you will need to enter the following data in the fields that appear:
- The output method (system alert or log to file).
- If you select Log to file, the name of the file to which you want the dump written.
|
- Click Next.
The Add New Trigger Rule-Select constraints dialog box appears (Figure 3-5).

This is an optional step that allows you to limit when an action is triggered; for example, you might only want your action to trigger every other day of the week or during specific hours. If you don't want to set a constraint, skip step 9 and go on to step 10.
- Select the constraints you want applied to the trigger rule.
- Date span sets a range of dates.
- Day of week sets which days of the week you want your action to trigger. If you select this option, you will need to also specify which days you want your action to trigger.
- Time span sets the time period.
- Click Next.
The Add New Trigger Rule-Name your rule dialog box appears (Figure 3-6).

- Enter a name for your new rule and click Finish.
The new rule appears on the Trigger Rules list (Figure 3-7).

Before you can apply the rule, you will need to activate it, as described in Activating and Deactivating a Rule.