Testing Rule Sets

When developing a rule set, it can be difficult to develop rule criteria to match all possible event conditions. Previously, the only way to test rules was to trigger an event within your monitored environment and seeing which rules match the event and what actions the rules perform. Beginning with Enterprise Manager Release 12.1.0.4, you can simulate existing events, thus allowing you to test rule actions during the rule set development phase and not waiting for specific event conditions to occur. The rule simulation feature lets you see how the rules will perform given a specific event. You immediately see which rules match for a given event and then see what actions are taken.

Note:

The simulate rule feature can only be used with event rules. Incident rules cannot be tested with this feature.

To simulate rules:

This procedure assumes you have already created rule sets. See "Creating a Rule Set" for instructions on creating a rule set. Ensure that the rule type is Incoming events and updates to events.

  1. From the Setup menu, select Incidents, and then Incident Rules. The Incident Rules - All Enterprise Rules page displays.
  2. Click Simulate Rules. The Simulate Rules dialog displays.

    Simulate rules dialog

  3. Enter the requisite search parameters to find matching events and click Search.
  4. Select an event from the list of results.

    list of results

  5. Click Start Simulation. The event will be passed through the rules as if the event had newly occurred. Rules will be simulated based on the current notification configuration (such as email address, schedule for the assigned administrator, or repeat notification setting).

    Changing the Target Name: Under certain circumstances, an event matching rule criteria may occur on a target that is not a rule target. For testing purposes, you are only interested in the event. To use the alternate target for the simulation, click Alter Target Name and Start Simulation.

    Results are displayed.


    simulation with results

    Testing Event Rules on a Production Target: Although you can generate an event on a test target, you may want to check the actions on a production target for final verification. You can safely test event rules on production targets without performing rule actions (sending email, SNMP traps, opening trouble tickets). To test your event rule on a production target, change the Target Name to a production target. When you run the simulation, you will see a list of actions to be performed by Enterprise Manager. None of these actions, however, will actually be performed on the production target.

  6. If the rule actions are not what you intended, edit the rules and repeat the rule simulation process until the rules perform the desired actions. The following guidelines can help ensure predictable/expected rule simulation results.

    If you do not see a rule action for email:

    • Make sure there is a rule that includes that event and has an action to send email.

    • If the specified email recipient is an Enterprise Manager administrator, make sure that administrator has an email address and notification schedule set up.

    • Make sure the email recipient has at least View privileges on the target of the event.

    • Check the SMTP gateway setup and make sure that the administrator has performed a Test Email.

    If you do not see other rule actions such as creating an incident or opening a ticket:

    • Make sure there is a rule that includes the event and corresponding action (create incident, for example).

    • Make sure the target is included in the rule set.

    • Make sure the rule set owner has at least Manage Events target privilege on the target of the event.

    • For notifications such as Open Ticket, Send SNMP trap, or Call Event Connector, make sure these are specified as actions in the event rule.