Add an event hub event source to your Azure Time Series Insights environment

Note

The Time Series Insights (TSI) service will no longer be supported after March 2025. Consider migrating existing TSI environments to alternative solutions as soon as possible. For more information on the deprecation and migration, visit our documentation.

This article describes how to use the Azure portal to add an event source that reads data from Azure Event Hubs to your Azure Time Series Insights environment.

Note

The steps that are described in this article apply both to the Azure Time Series Insights Gen 1 and Azure Time Series Insights Gen 2 environments.

Prerequisites

Add a consumer group to your event hub

Applications use consumer groups to pull data from Azure Event Hubs. To reliably read data from your event hub, provide a dedicated consumer group that's used only by this Azure Time Series Insights environment.

To add a new consumer group in your event hub:

  1. In the Azure portal, locate and open your event hub instance from the Overview pane of your event hub namespace. Select Entities > Event Hubs or find your instance under Name.

    Open your event hub namespace

  2. In your event hub instance, select Entities > Consumer groups. Then, select + Consumer group to add a new consumer group.

    Event hub - Add a consumer group

    Otherwise, select an existing consumer group and skip to the next section.

  3. On the Consumer groups page, enter a new unique value for Name. Use this same name when you create a new event source in the Azure Time Series Insights environment.

  4. Select Create.

Add a new event source

  1. Sign in to the Azure portal.

  2. Locate your existing Azure Time Series Insights environment. In the left menu, select All resources, and then select your Azure Time Series Insights environment.

  3. Select Event Sources, and then select Add.

    Under Event Sources, select the Add button

  4. Enter a value for Event source name that is unique to this Azure Time Series Insights environment, such as Contoso-TSI-Gen 1-Event-Hub-ES.

  5. For Source, select Event Hub.

  6. Select the appropriate values for Import option:

    • If you have an existing event hub in one of your subscriptions, select Use Event Hub from available subscriptions. This option is the easiest approach.

      Select an Event Source import option

    • The following table describes the required properties for the Use Event Hub from available subscriptions option:

      Subscription and event hub details

      Property Description
      Subscription The subscription the desired event hub instance and namespace belongs to.
      Event Hub namespace The event hub namespace the desired event hub instance belongs to.
      Event Hub name The name of the desired event hub instance.
      Event Hub policy value Select the desired shared access policy. You can create the shared access policy on the event hub Configure tab. Each shared access policy has a name, permissions that you set, and access keys. The shared access policy for your event source must have read permissions.
      Event Hub policy key Pre-populated from the selected Event Hub policy value.
    • If the event hub is external to your subscriptions or if you want to select advanced options, select Provide Event Hub settings manually.

      The following table describes the required properties for the Provide Event Hub settings manually option:

      Property Description
      Subscription ID The subscription the desired event hub instance and namespace belongs to.
      Resource group The resource group the desired event hub instance and namespace belongs to.
      Event Hub namespace The event hub namespace the desired event hub instance belongs to.
      Event Hub name The name of the desired event hub instance.
      Event Hub policy value Select the desired shared access policy. You can create the shared access policy on the event hub Configure tab. Each shared access policy has a name, permissions that you set, and access keys. The shared access policy for your event source must have read permissions.
      Event Hub policy key The shared access key that's used to authenticate access to the Service Bus namespace. Enter the primary or secondary key here.
    • Both options share the following configuration options:

      Property Description
      Event Hub consumer group The consumer group that reads events from the event hub. We highly recommend that you use a dedicated consumer group for your event source.
      Event serialization format Currently, JSON is the only available serialization format. Event messages must be in this format or data can't be read.
      Timestamp property name To determine this value, you need to understand the message format of the message data that's sent to the event hub. This value is the name of the specific event property in the message data that you want to use as the event timestamp. The value is case-sensitive. If left blank, the event enqueue time in the event source is used as the event timestamp.
  7. Add the dedicated Azure Time Series Insights consumer group name that you added to your event hub.

  8. Select Create.

    After the event source is created, Azure Time Series Insights automatically begins streaming data to your environment.

Next steps