Set alerts on business events in Real-Time hub

This article describes how to set alerts on business events in Real-Time hub.

Important

This feature is in preview.

  1. Sign in to Microsoft Fabric.

  2. If you see Power BI at the bottom-left of the page, switch to the Fabric workload by selecting Power BI and then selecting Fabric.

    Screenshot that shows how to switch to the Fabric workload.

  3. Select Real-Time on the left navigation bar.

    Screenshot that shows the Real-Time option on the left navigation bar in Microsoft Fabric.

Launch the Set alert page

Do steps from one of the following sections, which opens a side panel where you can configure the following options:

  • Events you want to monitor.
  • Conditions you want to look for in the events.
  • Action you want Fabric Activator to take.

Launch from the events list

  1. In Real-Time hub, select Business events under the Subscribe to category.

  2. Move the mouse over your business event, and do one of the following steps:

    • Select the Set alert button.

    • Select ellipsis (...), and select Set alert.

      Screenshot of the Business events page with Set alert menu for your business events.

Launch from the event detail page

  1. Select your business event from the list.

  2. On the detail page, select Set alert at the top of the page.

    Screenshot of the Azure blob storage events detail page with Set alert button selected.

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

  1. In the Monitor section of the Add rule pane, select Business events for Source.

    Screenshot of the Add rule pane.

  2. On the Configure page of the Connect data source wizard, confirm that your business event is selected under Business events.

    Screenshot of the Configure page of the Connect data source wizard.

  3. Select View schemas to see the event schema for your business event.

    Screenshot of the View schema button on Configure page of the Connect data source wizard.

  4. Review the event schema, and select Back to configure to return to the configuration page.

    Screenshot of the event schema.

  5. Choose Select business events to change the business event you want to monitor or to monitor multiple business events in the same rule. When you select multiple business events, they must be associated with schemas in a single schema set. If you make changes, select Save selection at the bottom of the page. If you don't make any change, select Cancel to close the business event selection page.

    Screenshot of the Select business events page.

  6. On the Configure page, select + Filter to add filters to the events. You can add multiple filters to filter the events based on your needs.

    Screenshot of the Configure page with a filter added.

  7. Select the field you want to filter on, choose the operator, and enter the value for the filter.

    Screenshot of the Configure page with filter configuration.

  8. Select Next at the bottom of the page.

    Screenshot of the Configure page with Next selected.

  9. On the Review + connect page, review the settings, and select Save.

    Screenshot of the Review + connect page of the Connect data source wizard.

Condition section

Choose the type of condition that you want to detect. You can use conditions that check:

  • on each event, do an action
  • on each event when a value is met, do an action
  • on each event grouped by a field, do an action (for example, on each PackageId event when ``Temperatureis greater than30`)

Follow one of these steps:

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

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

  • In the Condition section, for Check, select On each event when a value is met. Then, select the field that you want to check, the operator, and the value.

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

  • In the Condition section, for Check, select On each event grouped by a field when a value is met. Then, select the field that you want to group by, the field that you want to check, the operator, the value, and the occurrence. The occurrence can be one of these values: every time the condition is met, when it occurred specific number of times, when it was true for a specific duration.

    Screenshot that shows the Add rule pane with the condition grouped by a field 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

An Activator rule can run a Fabric activity defined in one of the following Fabric item types:

  • Dataflow
  • Pipeline
  • Spark job
  • Notebook
  • Function
  • Copy job
  • Publish business event (preview)

To configure your rule to launch a Fabric activity, follow these steps:

  1. For Select action, select the appropriate Fabric item type within the "Run Fabric Activities" section

    Screenshot of the Run Fabric items option.

  2. On Select Fabric item to run, select the Fabric item from the list.

  3. For the Pipeline, Dataflow, Notebook, Spark job, and Publish business event (preview) 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. The Copy job type doesn't accept parameters.

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

Run function

If you select Run function, follow these steps to select the function and specify parameters for it:

  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.

Publish business event (preview)

If you select Publish business event (preview), follow these steps to select a business event schema from the schema registry, and specify parameters for it:

  1. When you select Publish business event (preview), you see the Select a business event window.

  2. In this window, select a business event schema from the list of schemas that are registered in the schema registry. You can also search for a schema by typing its name in the search box.

    Screenshot of the Select a business event window.

  3. For parameters to the business event, specify values for each of the parameters defined for the schema as shown in the following example:

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

  1. In the Save location section, for Workspace, select the workspace where you want the Fabric activator item to be created or that already exists.

  2. For Item, select an existing activator item or create a new one. To create a new activator item, select Create a new item, and then 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. In the Add rule pane, select Create at the bottom of the page to create the alert.

    Screenshot of the Set alert page for Azure blob storage events.

  2. You see the Alert created page.

    Screenshot of the Alert created page for Azure blob storage events.

  3. On the Alert created page, select either Open to open the rule in the Fabric activator user interface in a separate tab or Done to close the page.

    Screenshot of the Open link on the Alert created page.

See the following end-to-end tutorials: