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

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 described in this article apply both to the Time Series Insights GA and Time Series Insights Preview environments.

Prerequisites

Add a consumer group to your event hub

Applications use consumer groups to pull data from Azure Event Hubs. Provide a dedicated consumer group, for use only by this Time Series Insights environment, to reliably read data from your event hub.

To add a new consumer group in your event hub:

  1. In the Azure portal, locate and open your event hub.

  2. Under Entities, select Consumer groups, and then select Consumer Group.

    Event hub - Add a consumer group

  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 Time Series Insights environment.

  4. Select Create.

Add a new event source

  1. Sign in to the Azure portal.

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

  3. Under Environment Topology, 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 Time Series Insights environment, such as event-stream.

  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.
    • If the event hub is external to your subscriptions or if you want to select advanced options, select Provide Event Hub settings manually.

    In the New event source pane, enter values for the first three parameters

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

    Subscription and event hub details

    Property Description
    Subscription Id Select the subscription in which this event hub was created.
    Service bus namespace Select the Azure Service Bus namespace that contains the event hub.
    Event hub name Select the name of the event hub.
    Event hub policy name Select the 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 key value might be prepopulated.
    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 no data can 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.
  8. The following table describes the required properties for the Provide Event Hub settings manually option:

    Property Description
    Subscription Id The subscription in which this event hub was created.
    Resource group The resource group in which this event hub was created.
    Service bus namespace A Service Bus namespace is a container for a set of messaging entities. When you created a new event hub, you also created a Service Bus namespace.
    Event hub name The name of your event hub. When you created your event hub, you also gave it a specific name.
    Event hub policy name The shared access policy. You can create a 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.
    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 no data can 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.
  9. Add the dedicated Time Series Insights consumer group name that you added to your event hub.

  10. Select Create.

    Select Create

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

Next steps