Previous Topic: Rule PlanningNext Topic: Use a Predefined Action Type


Create a Rule

A rule functions as a trigger that runs your action when the rule condition is evaluated as true.

Note: Only the original creator or an administrator can edit or delete a rule.

Follow these steps:

  1. Click Resources and select a server or service in the Explore tree.
  2. Click the Policy tab, and then the Rules tab.

    The Rules page appears.

  3. Click + (Add new rule).

    The Rule/Template wizard appears.

  4. Type a meaningful name for the rule in the Identification section, and then select Rule to create a rule.

    Note: Select Template to create a rule template that can be used with multiple rule definitions.

  5. Select Enable to make the rule active.
  6. Select Unlimited or Maximum (with number of retries) as the Number of Executions Allowed.

    Note: Setting a limit on the number of times the rule can run prevents excessive retries that slow down system response time.

  7. Click Next.

    The Template Modeling and Action Selection section appears.

  8. Define whether to model the rule on a template. Select an existing template or enter a name for a new template and select Enable to inherit any changes to the template.
  9. Select the action for your rule from the list. Click Next.

    The Define Rule Formula section appears.

  10. Create the condition formula for your rule by completing the following fields in the Rule Evaluation Formula section:
    Source

    Specifies the source for the data that the rule evaluates, which can be Overall Utilization, Event, or specific server metrics.

    Operator

    Specifies how to evaluate the source data against the value you enter in the Value field. The valid operators depend on the source. For example, if you select Overall Utilization, the following operators are valid:

    "=" "!=" "<" "<=" ">" ">="

    If you choose Event, the values are as follows:

    contains

    Matches an exact string or substring. Wildcards are not permitted in the Value field.

    RegEx (Regular Expression)

    Returns a value of true when strings matching the specified regular expression are found. Returns a value of false when no strings matching the specified regular expression are found.

    NotRegEx

    Returns a value of true when no strings matching the specified regular expression are found. Returns a value of false when strings matching the specified regular expression are found.

    Important! Verify that the rule and action name does not contain the string that you want to match. This best practice helps to avoid incremental firing of actions when events are matched in the next rule evaluation cycle.

    Example: If the Value field contains threshold as the matching string, the following events are matched:

    Event A: The memory threshold has been breached!

    Event B: threshold

    Value

    Specifies the numeric value or alphanumeric string against which the selected operator evaluates the source data.

    Lag

    Defines how often the rule must evaluate as true before the action triggers. Some actions that you define should trigger after a single occurrence. Other actions should trigger only after a number of occurrences signal a persistent problem. Note: When Source is set to Event, Lag is disabled by default.

    Logic Op

    Defines multiple formulas by using the logical operators AND or OR. Click New to complete each definition and add the formula to the list of defined formulas. The last formula that you define is set to NOOP by default.

    Your condition formula will be used to trigger the action when the rule evaluates to true. The Confirm Configuration section appears.

  11. Review the details of your rule, and then click Next at the top of the page.
  12. Click Finish to commit the update.

    Your rule or template is added to the Rules list.

  13. Click the Return to Rules List link to verify that the rule has been added.

Example: Set a Server Level Rule

This example sets a rule for a server that exceeds CPU and memory thresholds more than three times, or when an event occurs indicating that a server is discovered.

Rule formulas:

  1. CPU Utilization % > 80 (Lag 3) AND
  2. Memory Utilization % > 50 (Lag 3) OR
  3. Event RegEx .*discovered
  4. Event NotRegEx .*discovered NOOP

Action: Add 200 CPU Shares, Max 8000