Designing and Managing Behavior Models
-
Performing Actions Conditionally
(Action Router) - Creating an Action Router Rule -
There are two components to an Action Router rule: a condition and a list of actions. For example, suppose you need to develop a rule that will cause NerveCenter to send you e-mail if a device goes down. The rule's condition might be:
$TriggerName eq "deviceDown"
This means that you want to know if the Action Router is notified of a transition that occurred as a result of a deviceDown trigger.
SMTP Mail networkadmin@yourcompany.com
This means that if the condition is met, NerveCenter should send SMTP mail to the address shown.
The next two subsections explain how to create such rule conditions and rule actions:
Note that you must create both a condition and one or more actions to complete an Action Router rule.
Defining a rule condition is one part of defining an Action Router rule. After defining the rule condition, you must define a rule action to complete the Action Router rule. For information on defining a rule action, see the section Defining a Rule Action.
Admin
menu, choose Action Router Rule List
.The Action Router Rule List window is displayed.
New
button in the Action Router Rule List window.The Action Router Rule Definition window is displayed.
Name
field.
You write this rule condition using Perl. However, you need not write a complete Perl statement. You can assume the following context:
if (...) {
ruleAction;
}
All you must supply is the condition that would fit inside the parentheses. For example,
$OriginStateSev eq "Normal"
is a complete rule condition.
To help you write rule conditions, NerveCenter provides several aids:
For more information about these functions, see the section Functions for Use in Action Router Rule Conditions.
For further information about these lists, see the section Using Action Router's Object Lists.
Once you've finished building your rule condition, you must go to the Rule Action page and build a list of rule actions. For instructions on how to build this list, see the section Defining a Rule Action.
NerveCenter provides a number of functions that you can use in your Action Router rule conditions. The list below indicates what types of functions are available and where you can find detailed information about each function:
For reference information about these functions, see the section Variable-Binding Functions on page 182.
For reference information about these functions, see the section String-Matching Functions on page 159.
For reference information about this function, see the section in( ) Function on page 159.
If you are writing an Action Router rule condition and need to enter the name of an alarm, you do not need to:
Instead, you can select the name of the alarm from a list of alarms on the Rule Condition page. Selecting this name copies the name to the Rule Condition editing area, at the point of the cursor.
In addition to a list of alarms, the Rule Condition page provides lists of:
How to enter the rule condition $AlarmName eq `Authentication'
:
$AlarmName eq
using the editing area's pop-up help menu or your keyboard.
More
button on the Rule Condition page to expand the page.
Alarm
from the Condition Type
drop-down list.The list to the right of the drop-down list is populated with the names of all the alarms in the NerveCenter database.
Authentication
in the Alarms
list.
This action causes the text `Authentication'
to be added to the rule condition.
Save
button.Once you've created an Action Router rule condition, as described in the section Defining a Rule Condition, you must create a rule action to complete your Action Router rule. This action rule contains descriptions of one or more actions that you want to be performed when the rule condition is met.
Rule Action
tab.The Rule Action page is displayed.
New Action
button.A pop-up menu listing the actions that you can perform via the Action Router appears. Except for the Action Router and Alarm Counter actions, you can add to the rule any action that you can perform from an alarm transition:
For a description of what an action does, see the appropriate section in Chapter 12, Alarm Actions
All of the actions except Delete Node and Notes require parameters, so a dialog box appears. Again, refer to the appropriate section in Chapter 12, Alarm Actions for an explanation of how to supply the necessary parameters.
Save
button at the bottom of the Rule Composition window. Listing Existing Action Router Rules | Creating Multi-Alarm Behavior Models |
29 July 2003 |