---
sourceDocument: Brazil IT Operations Management
sourceDocumentLink: https://www.servicenow.com/docs/r/it-operations-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# Customize DEX alert events

# Customize DEX alert events {#ariaid-title1}

Release version: Brazil  
Updated October 23, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read  
Apply your organization's own event processing rules, such as enrichment or routing, by transforming DEX metric rule events with a custom script before they're processed.

## Before you begin

Role required: sn_dex.admin

The Application and Device Health plugin (com.sn_dex) version 5.3.0 or later must be installed.

## About this task

By default, DEX processes metric rule events through a fixed pipeline for alerts, proactive engagement, and remedial actions. If your organization has its own event processing rules, you
can use the sn_dex.DEXMetricRuleEventExtension extension point to modify each event before DEX processes it. For example, you can enrich events with extra data or change how they're routed.

You customize events by creating a script include that implements a `transform(event)` method, and then registering that script include as an implementation of the extension point.

You can't customize the following event properties. They're read-only because DEX alert processing depends on them.

* `severity`
* `message_key`
* `time_of_event`
* `source`
* `resource`
* `classification`
* `type`
* `metric_name`
{#customize-dex-alert-events__ul_read_only_event_props}

## Procedure

1. Navigate to AllSystem DefinitionScript Includes and select New.
2. In the Name field, enter a name for your customization script.  
   The name must match the `type` value in your script. The example in the next step uses `TestMetricRuleExtensionImp`.
3. In the Script field, define a `transform(event)` method that modifies the event and returns it.  
   Change only properties that aren't in the read-only list. The following example returns the event unchanged. Add your enrichment or routing logic before the `return` statement.

       var TestMetricRuleExtensionImp = Class.create();
       TestMetricRuleExtensionImp.prototype = {
           initialize: function() {
           },

           transform : function(event) {
               return event;
           },

           type: 'TestMetricRuleExtensionImp'
       };

4. Select Submit.
5. Create an extension instance for the sn_dex.DEXMetricRuleEventExtension extension point.  
   <br />

   1. In the Point field, enter <kbd class="ph userinput">sn_dex.DEXMetricRuleEventExtension</kbd>.
   2. In the Class field, select the script include you created.
   3. In the Order field, enter the processing order for this implementation.
   4. Select the Active check box.
   5. Select Submit.

## Result

DEX runs your `transform(event)` method on metric rule events before it processes them for alerts.

## What to do next

For information about the rules that generate these events, see [Create metric rules](https://www.servicenow.com/docs/vUNbfFkeS3ap7v0RXSaU2w "Create a metric rule to determine the metric, the threshold values and ranges, and the severity level of generated events. You can add a filter that determines the Configuration Items (CI) types or resources for which you receive alerts. For example, you can configure a filter to receive alerts only for Windows servers.").

*[\>]: and then


