ServiceNow event rules select incoming events, transform their values into alert content, and bind alerts to configuration items. Start with a narrow filter, map the fields operators need, then test binding and repeated faults. Rules change processing values in memory; they do not rewrite the stored event record in the Event table.
Decide what the rule is allowed to change
Before you open a rule, write down the decision you want it to make. Assess the effect of each proposed change on what operators see, and define a clear scope and test. Consider separating filtering, enrichment and suppression where practical, and testing suppression after the other changes. For background, see what an event rule is and when it runs.
Creating or editing an event rule requires evt_mgmt_admin. Navigate to All > Event Management > Rules > Event Rules and open the rule. Event rules reside in em_match_rule. Review the rules already present before adding another one, and check the controls on your release and instance. Ignore automation and Enrich automation in Service Operations Workspace also support filtering and standardizing alert data.
Filter ServiceNow event rules before mapping fields
Keep your intended filter conditions specific. Compare conditions based on source, node or metric with conditions based on message text, and test them against real payloads. Then list the incoming values you want to map and their intended destinations.
Configuring Event Filter requires evt_mgmt_admin and a named rule. Select New Criteria and combine conditions with AND or OR. Use the right panel to inspect the available event fields and Additional Information values. Filters are case-sensitive: a condition matching CPU can behave differently for cpu. The % character is not supported in filter conditions.
Filters on additional_info fields perform string comparisons, even when the values look numeric. Do not treat a comparison of those values as a numeric threshold. Include single-digit, multi-digit and missing values in the test set so that a plausible-looking result does not conceal the wrong comparison method.
Selecting Ignore events that match this filter inhibits alert creation for matching events. The events remain recorded in em_event. Distinguish an event that did not match the rule from one deliberately ignored by it; those outcomes call for different investigations.
Transform and compose the alert output
Customizing alert content requires evt_mgmt_admin. Open Transform and compose alert output. Transform extracts information into fields; Compose determines the text displayed in a selected field. Start with one representative payload and identify which values operators need to distinguish the failing component from the monitoring tool reporting it.
- Select an input field in Event Input and identify the text to extract.
- Assign an expression name that does not conflict with predefined field variables or other Additional Info names.
- Use the expression in the destination alert field, adding fixed wording or separators where needed.
- Inspect the generated output for missing values and repeated text before saving.
Composition supports field references such as ${node}. Manual attributes can expose fields in Additional Information; attributes prefixed with t_ appear in Alert Tags. Choose names that convey meaning to the next administrator. Keep source identifiers available for investigation rather than replacing them with a readable label that loses the original context.
Test regex extraction against complete values
Test each regex against complete field values, including matching and nonmatching examples. Event rule extraction uses the Java Matcher matches method, which matches the entire input sequence. A pattern that finds a fragment in another regex tool can therefore fail here. Account for the remaining input after the portion you want to capture.
Keep selected variables in the order in which they appear in the input. Pattern.DOTALL is enabled, so a dot can match a line terminator. Other regex flags cannot be changed through this implementation. Lookahead is supported; lookbehind is not. Test multiline descriptions, empty strings and changed separators, and record the expected extracted values alongside the payload.
Check configuration item associations and rule order
Compare sample events with the configuration items you expect their alerts to reference. Check the identifying values sent by the monitoring tool against the corresponding CI records, and investigate unexpected associations or missing matches. Record the unbound rate before making changes. The guide on how service mapping builds CI relationships offers related context.
Default Node binding can match host CIs using identifying attributes such as name, FQDN, IP address or MAC address. Other binding approaches use Additional Information or application and process details. Choose the approach according to the component the alert should identify. An application failure reported by a host needs a different expected result from a host availability failure.
Review Order when several rules can match. Rules run in ascending order, and Apply additional matching rules allows sequential processing. The last rule with binding settings determines CI binding. For team-based integrations, global rules run before rules for the assignment group associated with the event’s source instance. Trace the complete sequence before blaming a single mapping.
Test the message key and threshold decisions
Review the values you intend to use to identify repeated reports of a fault. Pay particular attention to values that change on each poll, such as timestamps, counters or error text. Send the same fault three times in a test instance and count the alerts it produces. Investigate unexpected counts before adding other logic.
If you plan to use threshold settings, test isolated readings, repeated readings, boundary values, event timing and recovery conditions. Record the observed results before relying on a threshold in production. Selecting Apply additional matching rules makes the Thresholds tab inactive, so include this dependency in the design review. For related guidance, see the alert suppression thresholds guide.
Before proposing filtering, severity, grouping or suppression changes, define the evidence operators need to retain. The guide to reducing alert noise by design discusses related design choices. Consider suppression after testing the other changes, and document the events you intend it to affect. For help planning this work, see ServiceNow implementation.
Simulate processing and review failure signs
Simulation requires evt_mgmt_admin. Navigate to All > Event Management > All Events, open an event and select Simulate event processing under Related Links. Follow the link in the resulting information message to the simulated alert. Its Activities tab shows applied event rules, field mapping rules and event field values.
Capture real payloads from the monitoring source, including the messy ones, and replay them against a non-production instance. Inspect the alert output alongside the original event; the stored event is not evidence that an in-memory transformation failed. Use this acceptance sequence:
- Replay one payload per fault type and compare output fields with expected values.
- Repeat a fault and check the alert count.
- Replay an ignored payload and check that the event remains available without the unwanted alert.
- Replay a missing or misspelled node and inspect the binding result.
- Compare the same sample set before and after the change.
Use empty fields, unexpected alert counts, missing CI associations and unexpected filtering results as prompts for investigation. Compare the payload, intended conditions and observed result before changing the configuration or adding another rule. Broader design questions sit in the event management guides and best practices.
Know when a rule is the wrong tool
If your goal involves reports from different monitoring tools or grouping by affected service, evaluate the available approaches against that goal. Compare a small set of test cases before expanding a rule set. Correct field mappings and CI associations first so that later decisions use reliable inputs.
For a release review, separate a change in monitoring payload format from a change in rule configuration. Preserve a sample from each format and compare the resulting alerts. If both changes happen together, the team loses a clear explanation of which change produced an empty expression, a different binding or an unexpected alert count.
Questions about maintaining event rules
Does deactivating a rule stop alerts from that source?
Deactivation allows Event Management to find another applicable rule. An alert can still be created unless an applicable ignore condition prevents it. Treat deactivation as a rule selection change when planning rollback.
Why is a rule with conditions being skipped?
A rule without a configured action is skipped. Check for ignore, threshold or binding settings, or configured match or composed fields. A named rule and a filter alone do not establish its intended output.
Can I change Classification as part of enrichment?
Do not change Classification in em_event manually, through a script or through an event rule. Keep this restriction in the review checklist when assessing proposed enrichment fields.
What should a rule handover record contain?
Keep the owner, intended event scope, sample payloads, expected outputs, binding target and rollback decision together. Record the change time so later alert counts can be compared with the correct configuration.