Designing and Managing Behavior Models - Performing Actions Conditionally
(Action Router)
- Creating an Action Router Rule -
Listing Existing Action Router Rules      Creating Multi-Alarm Behavior Models

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.

The rule's action might be:


   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

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.

 
  To define a rule condition:

  1. From the client's Admin menu, choose Action Router Rule List.

    The Action Router Rule List window is displayed.

  2. Select the New button in the Action Router Rule List window.

    The Action Router Rule Definition window is displayed.

    ruleComposition2

  3. Enter a unique name for your Action Router rule in the Name field.
  4. Write your rule condition in the Rule Condition text area.

    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:

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.

Functions for Use in Action Router Rule Conditions

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:

Using Action Router's Object Lists

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':

  1. In the Rule Condition editing area enter the text $AlarmName eq using the editing area's pop-up help menu or your keyboard.
  2. Select the More button on the Rule Condition page to expand the page.

    ruleComposition3

  3. Select 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.

  4. Double-click Authentication in the Alarms list.

    This action causes the text `Authentication' to be added to the rule condition.

  5. After you've defined your rule's action, select the Save button.

Defining a Rule Action

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.

 
  To create an action rule:

  1. In the Rule Composition window, select the Rule Action tab.

    The Rule Action page is displayed.

    ruleAction

  2. Select the 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:

  3. Select an action from the list.

    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.

  4. Repeat step 2 and step 3 for each action that you want to add to the rule action.
  5. Select the Save button at the bottom of the Rule Composition window.


Listing Existing Action Router Rules Creating Multi-Alarm Behavior Models
29 July 2003