Optimize 10.5 | webMethods Optimize Documentation | Using webMethods Optimize | Defining Rules | Creating a Rule
 
Creating a Rule
The Add/Edit/Copy Rule page enables you to create a rule. There are five sections on this page in which you can define various characteristics of a rule. Note that because of the complexities inherent in creating a rule, you must configure a rule expression before you can create a naming template for a rule.
Alternatively, Optimize enables you to create instant rules from the KPI Instance Detail page. These rules can be applied a selected KPI instance or to all instances of a KPI.
*To create a rule
1. In My webMethods:
Navigate > Applications > Administration > Analytics > Rules > Rule List
Optimize displays the Rule List page.
2. Click Create Rule. Optimize displays the Add/Edit/Copy Rule page.
3. In the Rule Information panel, type the name and description to use for the rule in the Rule Name and Description boxes. You can use any combination of characters and numbers. The rule name must be unique.
4. If you want to specify text indicating the severity of this rule, type it in the Severity text box. Text entered here appears on the Problem Report page and the Analytics Overview page, where you can search and sort based on the severity values, and any alerts or actions generated when this rule goes out of compliance can be configured to display the severity text. The Severity field can contain up to 20 characters and numbers.
5. Set attributes for the rule by following the steps in Setting Rule Attributes below.
6. Build the rule's expression by following the steps in Creating Rule Expressions.
7. If you want to specify a naming template for instances of this rule, enter the name in the Naming Template field. Naming templates are only applicable for KPI and Event rules.
A naming template is used to generate a derived name for each rule instance. By default, a rule instance name is composed of the base rule name plus the KPI hierarchy descriptions for each KPI used in the rule. This can lead to a lengthy display name or a name that may not suit your purposes. For example, the default rule name:
AE Consumed Memory GT 30mb AnalyticEngine.LogicalServerName.Optimize
Analytic Engine.InternalMonitorQualifier.Name.Virtual Machine Stats.
consists of a base rule name (AE Consumed Memory GT 30mb) and two KPI hierarchy descriptions (AnalyticEngine.LogicalServerName.Optimize Analytic Engine and InternalMonitorQualifier.Name.Virtual Machine Stats) arranged in this syntax:

<base-rule-name> <hierarchy-desc1>.<hierarchy-descr2>.<dimensional-value>
If the Naming Template field is empty, all instances of the rule use the default rule name. When a naming template is specified, all rule instance names use the specified template to generate a name.
The naming template can contain any descriptive text in combination with one or more dimension variables. Variables should be used to make the template distinctive for each rule instance. The syntax for using variables in a template is:
$DimensionName.AttributeName
where the DimensionName and AttributeNamepairing identify a dimensional value used by the KPI. Multiple pairs can be used, each separated by a space or other character. For example, the following template:
AE Consumed Mem GT 30 - $InternalMonitorQualifier.Name
would result in the following distinctive displayed name:
AE Consumed Mem GT 30 - Virtual Machine Stats
The dimension variables that can be used in a template depend on the KPI evaluated by the rule. The Rule Editor provides tools to insert dimension variables and to view a sample of the instance derived name. To use these tools, you must first choose the KPI in the rule's expression. To determine what variables you can use, do the following:
a. Type the desired descriptive text into the Naming Template field.
b. Place the cursor at a point where you want to add a dimension variable, and click the Arrow icon to open a drop down list of available dimension variables.
c. Select the desire variable to add it to the cursor position in the Naming Template field.
d. Repeat the preceding two steps as desired to add additional variables to the derived name that you are creating.
8. On the Alerts tab, identify the users to alert when the rule is violated by following the steps in Specifying Alert Recipients.
9. On the Actions tab, identify the actions to take when the rule is violated by following the steps in Specifying Alert Recipients.
The Rule Instances panel shows the number of instances of the rule, the number of instances out of compliance, and the number of instances enabled. This information is relevant only after the rule is created. If you are creating a new rule, jump to the final step in this sequence.
10. On the Rule Instances panel, click View Instances to display the Rule Instances page. See Viewing Information About Rules in this guide for details.
11. Click Save on the Add/Edit/Copy Rule page to save your changes.