# Send data to Azure Event Hubs

{% hint style="info" %}
See the changelog of the **Azure Event Hubs** Data sink type [here](/data-sinks/azure-event-hubs-data-sink.md).
{% endhint %}

## Overview

Onum supports integration with [Azure Event Hubs](https://azure.microsoft.com/en-us/products/event-hubs).

Azure Event Hubs is a real-time data ingestion that allows you to stream millions of events per second from any source to build dynamic data pipelines and immediately respond to business challenges.

## Prerequisites

* A valid [Microsoft Azure subscription](https://portal.azure.com/)
* An **Azure Resource Group**
* An **Event Hubs namespace** container for one or more Event Hubs
* An **Event Hub** to send events to

## Azure Event Hubs Setup&#x20;

Once you have your Hub to send to, you’ll need to authenticate to receive events.

* **Shared Access Signature (SAS)**&#x20;
* **Azure Active Directory (Azure AD)**&#x20;
* **Connection String (with SAS key)**
* **Shared Access Policies** — Namespace- or Event Hub–level access rules defining specific permissions (Send, Listen, Manage).

## Onum setup

{% stepper %}
{% step %}
Log in to your Onum tenant and click **Data Sinks> New Data sink**.
{% endstep %}

{% step %}
Double-click the **Azure Event Hubs** Sink.
{% endstep %}

{% step %}
Enter a **Name** for the new Data Sink. Optionally, add a **Description** and some **Tags** to identify the Sink.
{% endstep %}

{% step %}
Decide whether or not to include this Data sink info in the metrics and graphs of the [**Home**](/the-workspace/home.md) area.
{% endstep %}

{% step %}
The **Event Hub Namespace** is the container for your various event hubs. Click it to see the individual hubs it contains.

<figure><img src="/files/FvcFXphXf6yQgmfy3O6D" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
To see the individual Event Hubs in your Namespace, click it in the list to open its contents. Scroll down to the bottom to see the list of Event Hubs.

Find the event hub to connect to and enter the **Event Hub Name** in this field.

<figure><img src="/files/sP6PrkBirl2hhEOIMtxc" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
To communicate with an event hub or a namespace, you need a **Connection String**.<br>

Note that this is required if you select **None** in the **Authentication Method** option.

1. Click the Event Hub name in the list to open it.
2. In the left menu, go to **Shared Access Policies**.
3. If no policy has been created for an event hub, create one with **Manage**, **Send**, or **Listen** access.
4. Select the policy from the list.
5. Select the **copy** button next to the **Connection string-primary key** field.

Depending on the version of Azure you are using, the corresponding field may have a different name, so to help you find it, look for the string with the same format:

`Endpoint=sb://.servicebus.windows.net/; SharedAccessKeyName=RootManageSharedAccessKey; SharedAccessKey=`&#x20;

<figure><img src="/files/5EP1Bl18tsLiU1tx6wcA" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
If an **Authentication Method**<mark style="color:red;">**\***</mark>  is required, select the method and enter the credentials of the selected method below. If not, select **None**.
{% endstep %}

{% step %}
Enter your SASL authentication parameters for Azure Event Hubs.

<table><thead><tr><th width="170.23046875">Parameters</th><th>Description</th></tr></thead><tbody><tr><td><strong>SASL Username</strong></td><td>Username for SASL authentication.<br><br>Note that this is only required if you select <strong>SASL</strong> in the <strong>Authentication Method</strong> option.</td></tr><tr><td><strong>SASL Password</strong></td><td>Add your SASL password from your <a href="/pages/YAQlTald3E2cheY5V0Hk">Secrets</a> or create one.<br><br>Note that this is only required if you select <strong>SASL</strong> in the <strong>Authentication Method</strong> option.</td></tr><tr><td><strong>Authentication Token</strong></td><td>Add your token from your <a href="/pages/YAQlTald3E2cheY5V0Hk">Secrets</a> or create one.<br><br>Note that this is only required if you select <strong>SAS Token</strong> or <strong>AAD Token</strong> in the <strong>Authentication Method</strong> option.</td></tr><tr><td><strong>Tenant ID</strong></td><td>The unique Tenant ID associated with your Azure account.<br><br>Note that this is only required if you select <strong>AAD Token</strong> in the <strong>Authentication Method</strong> option.</td></tr><tr><td><strong>Client ID</strong></td><td>The Client ID used for authenticating with Azure Active Directory.<br><br>Note that this is only required if you select <strong>AAD Token</strong> in the <strong>Authentication Method</strong> option.</td></tr></tbody></table>
{% endstep %}

{% step %}
Click **New secret** to create a new one:

* Give the secret a **Name**.
* Turn off the **Expiration date** option.
* Click **Add new value** and paste the secret corresponding to the JWT token you generated before. Remember that the token will be added in the Zscaler configuration.
* Click **Save**.

<figure><picture><source srcset="/files/NeeWsSQzoChVxRIY76Nt" media="(prefers-color-scheme: dark)"><img src="/files/1oTccyPmgZJ1laY7IhZH" alt=""></picture><figcaption></figcaption></figure>

{% hint style="info" %}
Learn more about secrets in Onum in [this article](/administration/global-settings/organization-settings/secrets-management.md).
{% endhint %}
{% endstep %}

{% step %}
Enter your TLS authentication parameters for Azure Event Hubs.

{% hint style="warning" %}
Note that these parameters are only required if you select **TLS** in the **Authentication Method** option.
{% endhint %}

Add your **CA certificate** from your [Secrets](/administration/global-settings/organization-settings/secrets-management.md) or create one.

Add your **Client Certificate** from your [Secrets](/administration/global-settings/organization-settings/secrets-management.md) or create one.
{% endstep %}

{% step %}
Enter the batch configuration settings, or leave blank if you do not wish to enable batch sending.

* **Batch Size -** The number of messages to batch before sending to Event Hubs.
* **Batch Timeout -** The maximum amount of time in milliseconds to wait before sending a batch.
* **Retry Attempts -** Number of retry attempts before failing.
* **Retry Interval -** Interval in milliseconds between retry attempts.
  {% endstep %}
  {% endstepper %}

Click **Create data sink** when complete.&#x20;

Your new Data sink will appear in the **Data sinks** area list.

## Pipeline configuration <a href="#pipeline-configuration" id="pipeline-configuration"></a>

When it comes to using this Data sink in a [Pipeline](/the-workspace/pipelines.md), you must configure the following output parameters. To do it, simply click the Data sink on the canvas and select **Configuration**.

### Output configuration <a href="#output-configuration" id="output-configuration"></a>

Choose the **Message**<mark style="color:red;">**\***</mark> field that contains the data to be sent.

Click **Save** to save your configuration.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onum.com/the-workspace/data-sinks/data-sink-integrations/send-data-to-microsoft-products/send-data-to-azure-event-hubs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
