Azure Event Hub
Oracle AI Database@Azure environments can generate operational telemetry that you can monitor, retain, analyze, or forward to downstream systems. Depending on the your monitoring architecture, Azure Monitor diagnostic settings can route this data to Azure-native observability services such as Azure Monitor, Azure Log Analytics, Azure Storage, Azure Event Hubs, or supported partner solutions.
Azure Event Hubs Use Cases
Use Azure Event Hubs when you want to stream monitoring, event, audit, or telemetry data to an Azure-native ingestion point for further processing.
The following table shows common use cases.
| Use case | Destination |
|---|---|
| Query logs and metrics inside Azure | Azure Log Analytics Workspace |
| Use KQL queries, workbooks, and Azure-native alerting | Azure Log Analytics Workspace |
| Archive logs for retention or compliance | Azure Storage Account |
| Stream events to external consumers | Azure Event Hubs |
| Integrate with SIEM or observability platforms | Azure Event Hubs or Azure Monitor partner solutions |
| Build a custom forwarding pipeline | Azure Event Hubs with Azure Functions, Stream Analytics, or a custom consumer |
Azure Monitor diagnostic settings can route platform metrics, activity logs, and resource logs to multiple destinations, including Azure Log Analytics Workspace, Azure Storage Account, Azure Event Hubs, and Azure Monitor partner solutions.
Complete the following steps:
- Create an Azure Event Hubs Namespace
- From Azure portal, search for Event Hubs.

- Select the Create button to create a namespace.

- On the Basics tab of the Create Namespace page, enter the following information:
- Choose your Subscription and Resource group.
- Enter a descriptive Namespace name. The namespace must be between 6 and 50 characters long. The namespace can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
- Select the Azure region from the Region dropdown list.
- From the Pricing tier list, select the pricing tier based on the expected Throughput Units and retention requirements.
- Select the Next: Advanced > button.
- On the Advanced tab of the Create Namespace page, enter the following information:
- Select the minimum TLS version from the dropdown list.
Note
Increasing the minimum TLS version prevents clients using a lower TLS version from connecting to the namespace. - Enable or disable the Local Authentication toggle if you want to enable or disable local authentication (SAS key authentication).
- Select the Next: Networking > button.
- Select the minimum TLS version from the dropdown list.
- On the Networking tab of the Create Namespace page, enter the following information:
- From the Connectivity method section, choose the connectivity method. You can connect to this namespace either publicly, via public IP addresses or service endpoints, or privately, using a private endpoint.
Note
Private access is only available on Dedicated, Premium or Standard namespaces. - Select the Next: Tags > button.
- From the Connectivity method section, choose the connectivity method. You can connect to this namespace either publicly, via public IP addresses or service endpoints, or privately, using a private endpoint.
- On the Tags tab of the Create Namespace page, you can add a tag. This step is optional. Select the Next: Review + create > button.
- Review the information. Once validation succeeds, select the Create button.

- From Azure portal, search for Event Hubs.
- Create an Event Hub
- After the namespace is created, open the Event Hubs namespace that you created in the step 1g.
- From the left menu, expand the Entities section and then select Event Hubs.
- To create a new Event Hub, select the + Event Hub button.
- On the Basics tab of the Create Event Hub page, enter the following information:
- Enter a descriptive Name for your Event Hub. The name can contain only letters, numbers, periods, hyphens and underscores. The name must start and end with a letter or number.
- Use the Partition count slider to set a value for partitions count.
- From the Retention section, configure the retention setting for your Event Hub.
- Select the Cleanup policy. Events are retained or discarded based on the cleanup policy.
- Enter the Retention time (hrs). This value specifies the maximum time that an event is retained before it is discarded.
- Select the Next: Capture > button.
- On the Capture tab of the Create Event Hub page, enter the following information:
- You can choose to use the Capture feature.
Note
The Capture feature is not available in a Basic Tier Namespace. - Select the Next: Review + create > button.
- You can choose to use the Capture feature.
- Review the information. Once validation succeeds, select the Create button.
Example:- Namespace:
exadbeventhub01 - Event Hub:
insights-metrics-pt1m
- Create Consumer Groups
A consumer group provides an independent view of the Event Hub stream. Each consuming application or service should use its own consumer group so that it reads events independently without affecting other consumers. To create a consumer group:
- From Azure portal, select Event Hubs.
- From the list, select your Events Hub Namespace that you are using.
- Expand the Entities section, and then select Event Hubs.
- Select the Name of your Event Hubs that you are using.
- Select the + Consumer group button to create a consumer group.
- Enter a unique Name for your consumer group.
- Select the Create button.
- Verify that the consumer group is displayed in the list.
Example names:data-explorer-demostream-analytics-demo
Recommended names:data-explorer-demostream-analytics-demopowerbi-demofabric-demosiem-consumercustom-api-consumer
Avoid using a single generic consumer group for multiple applications. Using separate consumer groups simplifies troubleshooting and operations.

- Configure Diagnostic Routing
- From Azure portal, select Oracle AI Database@Azure, and then select a resource that emits logs or metrics.
- From the left menu, expand the Monitoring section, and then select Diagnostic settings.
- Select the + Add diagnostic setting button.
- From the Diagnostic setting page, select the required Logs or Metrics.
- From the Destination details section, choose the destination. Available destinations include:
- Log Analytics Workspace
- Storage Account
- Event Hub
- Partner Solution
Choose the Stream to an event hub option to send data to Event Hubs. Select Event Hubs namespace , Event Hub name, and Event hub policy name.
- Select the Save button.
Azure Monitor diagnostic settings can send logs and metrics to Event Hubs for streaming to external systems, including SIEM and other log analytics solutions.
- Validate Events with Event Hub Data Explorer
Event Hub Data Explorer provides a simple way to verify that events arrive in Event Hubs.
- From Azure portal, select Event Hubs and then select your Event Hubs Namespace that you are using.
- From the left menu, select Data Explorer.
- From the dropdown list, select Event Hub and Consumer group.
- Choose your Event position.
- Select the View events button.

- Process Event Hubs Data with Azure Stream Analytics
Azure Stream Analytics can consume events from Event Hubs, transform the data, and write output to Azure Storage, Power BI, Azure SQL, or another Event Hub.
- Complete the following steps to create a Azure Stream Analytics job.
- From Azure portal, search for Stream Analytics jobs.
- Select the Create button.
- On the Basics tab of the New Stream Analytics job page, enter the following information:
- Select Subscription and Resource group.
- Enter a descriptive Name. Stream Analytics job name can contain alphanumeric characters, hyphens, and underscores only and must be 3-63 characters long.
- From the dropdown list, select the Region.
- Choose the Hosting environment as Cloud.
- Select the number of Streaming units.
- Select the Next button.
- On the Storage tab of the New Stream Analytics job page, you can add a storage account. This step is optional. Select the Next button.
- On the Tags tab of the New Stream Analytics job page, you can add a tag. This step is optional. Select the Next button.
- On the Managed Identity tab of the New Stream Analytics job page, you can enable managed identity. This step is optional. Select the Next button.
- On the Review + create tab of the New Stream Analytics job page, review your information and once the validation succeeds, select the Create button.

- Complete the following steps to add Event Hub as input.
- Navigate to Job topology.

- Select Inputs.
- Select the + Add stream input button and then choose the Event Hub option.
- On the Event Hub input configuration page, enter the following information:
- Enter an alias in the Input alias field.
- Choose the Select Event Hub from your subscriptions option and then select your Subscription.
- Select the Event Hub namespace that you created previously.
- Choose the Use existing option for Event Hub name.
- Enter your Event Hub consumer group.
- Set the event serialization format to JSON if the event body uses JSON.
- Select the Save button to save your settings.
Example input alias:ehinput

- Navigate to Job topology.
- Complete the following steps to add Azure Blob Storage as output.
- Navigate to Job topology.
- Select Outputs.
- Select the + Add button and then choose Blob Storage / ADLS Gen2.
- On the Blob storage output settings page, enter the following information.
- Enter an alias for the output.
- Select your Azure subscription.
- Select your Azure Storage account.
- Enter a name for the container
- Select JSON or CSV serialization.
- Select the Save button to save your settings.
Example output alias:bloboutput

- Complete the following steps to add the query.
- Use the Stream Analytics query editor to transform incoming events.
SELECT r.ArrayValue.metricName, AVG(r.ArrayValue.average) AS AvgValue, MAX(r.ArrayValue.maximum) AS MaxValue, MIN(r.ArrayValue.minimum) AS MinValue, COUNT(*) AS Samples, System.Timestamp() AS WindowEndTime INTO bloboutput FROM ehinput CROSS APPLY GetArrayElements(ehinput.records) AS r WHERE r.ArrayValue.metricName IN ( 'oci_autonomous_database/CpuUtilization', 'oci_autonomous_database/StorageUtilization', 'oci_autonomous_database/CurrentLogons', 'oci_autonomous_database/DatabaseAvailability', 'oci_autonomous_database/FailedLogons', 'oci_autonomous_database/Sessions' ) GROUP BY r.ArrayValue.metricName, TumblingWindow(minute, 1)This query:- Reads events from the Event Hub input.
- Expands the nested records array.
- Filters selected database health metrics.
- Aggregates values in one-minute windows.
- Writes processed output to Blob Storage.
- Use the Stream Analytics query editor to transform incoming events.
- Complete the following steps to start the job.
- Navigate to Stream Analytics job and then select the job that you are using.
- Select the Start button.
- Choose Now as the Job output start time.
- Select the Start button.
- Confirm that the job starts successfully.

- Complete the following steps to create a Azure Stream Analytics job.
- Verify Output in Azure Blob Storage
After the Stream Analytics job starts and new events arrive:
- Open the storage account.
- Select the storage account name.
- Select Data storage > Containers.
- Open the container.
- Navigate to the generated folder.
- Open or download the JSON or CSV files.
Example processed output:{"metricName":"oci_autonomous_database/DatabaseAvailability","AvgValue":1.0,"MaxValue":1.0,"MinValue":1.0,"Samples":3,"WindowEndTime":"2026-05-27T16:56:00.0000000Z"} {"metricName":"oci_autonomous_database/StorageUtilization","AvgValue":9.0,"MaxValue":9.0,"MinValue":9.0,"Samples":3,"WindowEndTime":"2026-05-27T16:56:00.0000000Z"} {"metricName":"oci_autonomous_database/CpuUtilization","AvgValue":0.0076,"MaxValue":0.0215,"MinValue":0.0,"Samples":3,"WindowEndTime":"2026-05-27T16:56:00.0000000Z"}