Edit

Share via


Set alerts on anomaly detection events in Real-Time hub (Preview)

This article walks you through how to configure alerts for anomaly detection events using the Real-Time hub in Microsoft Fabric. The alerts help you monitor specific events and trigger automated actions when those events occur.

Important

This feature is in preview.

How to set alerts on anomaly detection events

Launch the Set alert page

  1. Select the Real-Time hub icon in the left navigation pane of the Fabric portal.

    Screenshot that shows the Real-time hub icon in the Fabric portal.

  2. In the Real-Time hub, select Fabric events under the Subscribe to category.

    Screenshot of the Fabric events option.

  3. In the Fabric events list, locate Anomaly detection event. Select either the ⚡ lightning icon or the ⋯ (three dots) menu next to the event, then select Set alert.

    Screenshot that shows the Anomaly Detection events in the Fabric events list.

Details section

On the Add rule page, in the Details section, for Rule name, enter a name for the rule.

Screenshot that shows the Add rule pane with the rule name filled.

Monitor section

In the Add rule side panel, configure the following settings:

  1. In the Monitor section, choose Select source events.

    Screenshot of the Set alert side panel.

  2. In the Configure connection settings page, choose your Fabric workspace. This workspace should contain the anomaly detection events you want to monitor.

    Screenshot of the Configure connection settings dialog.

    1. Select the Item that you want to monitor. This item should be a Fabric workspace item that contains the anomaly detection events you want to track.

      Screenshot of the Item setting.

    2. Select the Configuration option.

    3. Set filters to narrow down the events you want to monitor. You can filter by specific attributes, including Field, Operator, and Value. Ideally, set the filter for when data.ConfidenceScore is greater than a specified value to ensure that only high-confidence anomaly detection events are tracked.

      Screenshot of the Set filters section in the Configure connection settings dialog.

    4. Select Next to proceed to the next step.

    5. Review your selections on the Review + connect page. Ensure that the Fabric workspace and item are correct, and that the filters are set as desired. Select Save to confirm your selections or Back to edit.

      Screenshot of the Review + connect page in the Configure connection settings dialog.

Condition section

In the Condition section, for Check, select On each event.

Screenshot that shows the Add rule pane with the condition selected.

Action section

In the Action section, select one of the following actions:

Email

To configure the alert to send an email when the condition is met, follow these steps:

  1. For Select action, select Send email.

  2. For To, enter the email address of the receiver or use the drop-down list to select a property whose value is an email address.

  3. For Subject, enter a subject for the email.

  4. For Headline, enter a headline for the email.

  5. For Notes, enter notes for the emails.

    Note

    When entering subject, headline, or notes, you can refer to properties in the data by typing @ or by selecting the button next to the text boxes. For example, @BikepointID.

  6. For Context, select values from the drop-down list that you want to include in the context.

    Screenshot of the Add rule pane with the Send email action selected.

Teams message

To configure the alert to send a Teams message to an individual or a group chat or a channel when the condition is met, follow these steps:

  1. For Select action, select Teams -> Message to individuals or Group chat message, or Channel post.

  2. Follow one of these steps depending on the option you selected in the previous step:

    • If you selected the Message to individuals option, enter email addresses of receivers or use the drop-down list to select a property whose value is an email address. When the condition is met, a Teams message is sent to specified individuals.
    • If you selected the Group chat message option, select a group chat from the drop-down list. When the condition is met, a message is posted to the group chat.
    • If you selected the Channel post option, select a team and a channel. When the condition is met, a message is posted in the channel.
  3. For Headline, enter a headline for the Teams message.

  4. For Notes, enter notes for the Teams message.

    Note

    When entering headline or notes, you can refer to properties in the data by typing @ or by selecting the button next to the text boxes. For example, @BikepointID.

  5. For Context, select values from the drop-down list that you want to include in the context.

    Screenshot of the Add rule pane with the Send Teams message option selected.

Run Fabric activities

To configure the alert to launch a Fabric pipeline, notebook, or Spark job when the condition is met, follow these steps:

  1. For Select action, select Run pipeline, Run notebook, Run Spark job, or Run Function (preview).

    Screenshot of the Run Fabric items option.

  2. On Select Fabric item to run, select the Fabric item (pipeline, notebook, Spark job, or function) from the list.

  3. For the Pipeline, Notebook, and Spark job types, select Add parameter and specify the name of the parameter for the Fabric item and a value for it. You can add more than one parameter.

    Screenshot of the Add rule pane with parameters for a Fabric item specified.

    If you selected Run function option, follow these steps:

    1. For Function, select a function from the list.

    2. For parameters to the function, specify values for each of the parameters defined for the function as shown in the following example:

      Screenshot of the Add rule pane with parameters for a Function specified.

      You can use properties from the data by typing @ or by selecting the button next to the text boxes. For example, @BikepointID.

Custom action

To configure the alert to call a custom action when the condition is met, follow these steps:

  1. For Select action, select Create custom action.

    Screenshot of the Action section with custom action selected.

  2. As mentioned in the Action section, create the rule first, and then complete the custom action setup by following steps from Trigger custom actions (Power Automate flows).

    Screenshot of the custom action selected.

  3. After you create the custom action, in the Definition pane of the rule, select the custom action from the Action drop-down list.

    Screenshot of the custom action selected in the Select action drop-down list.

Save location section

In the Save location section, for Workspace, select the workspace where you want to Fabric activator item to be created or that already exists. If you're creating a new activator item, enter a name for the activator item.

Screenshot that shows the Add rule pane with the location for the Fabric activator item selected.

Create alert

  1. Select Create at the bottom of the page to create the alert.

    Screenshot that shows the Set alert page with all fields selected.

  2. You see the Alert created page with a link to open the rule in the Fabric activator user interface in a separate tab.

    Screenshot that shows Alert created page.

  3. You see the Activator item in the Fabric Activator editor user interface. Select the rule if it's not already selected. You can update the rule in this user interface. For example, update the subject, headline, or change the action from email to Teams message.

    Screenshot that shows the activator in an editor.