Add an event hub event source to your Azure Time Series Insights environment
Note
The Time Series Insights service will be retired on 7 July 2024. Consider migrating existing 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
- Create an Azure Time Series Insights environment as described in Create an Azure Time Series Insights environment.
- Create an event hub. Read Create an Event Hubs namespace and an event hub by using the Azure portal.
- The event hub must have active message events sent to it. Learn how to Send events to Azure Event Hubs by using the .NET Framework.
- Create a dedicated consumer group in the event hub that the Azure Time Series Insights environment can consume from. Each Azure Time Series Insights event source must have its own dedicated consumer group that isn't shared with any other consumer. If multiple readers consume events from the same consumer group, all readers are likely to exhibit failures. There's a limit of 20 consumer groups per event hub. For details, read the Event Hubs programming guide.
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:
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.
In your event hub instance, select Entities > Consumer groups. Then, select + Consumer group to add a new consumer group.
Otherwise, select an existing consumer group and skip to the next section.
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.
Select Create.
Add a new event source
Sign in to the Azure portal.
Locate your existing Azure Time Series Insights environment. In the left menu, select All resources, and then select your Azure Time Series Insights environment.
Select Event Sources, and then select Add.
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
.For Source, select Event Hub.
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.
The following table describes the required properties for the Use Event Hub from available subscriptions option:
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.
Add the dedicated Azure Time Series Insights consumer group name that you added to your event hub.
Select Create.
After the event source is created, Azure Time Series Insights automatically begins streaming data to your environment.
Next steps
Define data access policies to secure the data.
Send events to the event source.
Access your environment in the Azure Time Series Insights Explorer.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for