Creating an Action for a Test Condition

In the Hawk Console, you can define an action to take when a test condition for a rule of the Hawk agent becomes true.

Procedure

1. In the Hawk Console, open the Hawk Agent page to which you want to add an action.
For steps, see Viewing the Agent Details.
2. In the Agent’s page, select the Rulebases tab.
All the rulebases for the Hawk agent are displayed. For details, see Rulebases Tab.
3. On the Rulebases tab, click the rulebase name which you want to edit.

All the rules in the rulebase are listed. For details, see Rule Details Page.

4. Click the rule name for which you want to add the action.

All the test conditions in the rule are listed. For details, see Test Details Page.

5. Click the test condition name to which you want to add action.

All the actions in the test are listed. For details, see Actions Details Page.

6. Under the Actions section, click Add Action.

The New Action window opens.

7. In the New Action window, select the action you want to perform and enter the details to relevant fields. The following table lists all the available actions.

Action Types in the Action Editor

Action Type

Result

Usage Notes

Alert (default)

Sends an alert message to Hawk Console

In the Message field, type the alert text that you want to display in the Alerts tab.

Specify an alert level: high (default), medium or low.

Notification

Sends a notification message to Hawk Console

In the Notification field, type the notification text that you want to display in the Hawk Console Alerts tab.

Method

Invokes a microagent method on the TIBCO Hawk agent machine

Select a microagent and method from the Microagent Info panel. Specify any required arguments.

Email

Sends an email message.

Specify a message recipient as recipient@domain.com. Specify a subject string, an SMTP mail server for sending the message, and message text.

Post Condition

Creates a posted condition to use in another rule in the same rulebase

In the Posted Condition field, type a label for the posted condition. For more information, see Creating and Using Posted Conditions in Hawk Console.

8. Select the Schedule that you want to apply to the action. For details about the schedules, see Schedule Management.
9. (Optional) Click Advance Options to add flexibility in timing when an action is performed.

The following table lists the Advance Options fields displayed for the new test.

New Rule Wizard Common Fields

Fields

Description

Escalation Period

To escalate a problem, type a wait interval in seconds in the Escalation Period field.

The action is not performed the first time the associated test is true, but instead starts an internal timer. When the action is triggered by a test transition from false to true, the timer is started. If the associated test remains true for another evaluation after the specified interval, then the action is performed. You can use an escalation period to respond to continuing or deteriorating conditions.

Action Policy

Specify how actions are performed. The values are:

ALWAYS - The action is performed each time the associated test is evaluated as true, even if the test was true in the last evaluation.
COUNT_ON_INTERVAL - Specify the maximum number of times the action can be performed in the Max Count field, no matter how long the associated test continues to remain true. If the test becomes false, the counter is reset. Specify the number of seconds to wait between actions, in the Interval field, as long as the test is true. The related action can only be triggered at a test evaluation, so the actual interval between actions might be longer than the specified Interval.

This option is useful when the action runs a paging script. A single page might be lost, but paging at each test evaluation (such as once per minute) is too often. With this option, you can send the page every five minutes until it is likely to be received.

ONCE_ONLY_UNTIL_MESSAGE_CHANGE - The first time this action is triggered by a test, the action is performed. On subsequent true evaluations, the action is performed only until there is a change in the alert message.

This option is applicable only if the associated action creates an alert message with some string variables. The action is performed each time the value of the string variable changes resulting in a change in the alert message.

Substituting variables in alert messages overrules this feature.

ONCE_ONLY - The first time this action is triggered by a test, the action is performed. On subsequent true evaluations, the action is not performed. The action is not performed again until the test becomes false and then true again. This is the default behavior for all actions.

Substitution of variables in alert messages has no impact on this feature.

Max Count

Use this field when the Action Policy is COUNT_ON_INTERVAL. Specify the maximum number of times the action can be performed, no matter how long the associated test continues to remain true. If the test becomes false, the counter is reset.

Interval

Use this field when the Action Policy is COUNT_ON_INTERVAL. Specify the number of seconds to wait between actions, as long as the test is true.


10. Click Create Action.
The New Action window closes and the action is created for the test condition.

What to do Next

Deploy the rulebase to the domain for the new action to take effect, see Deploying a Rulebase to the Associated Hawk Agent.