# Azure Event Hub

### Prerequisites

The source must have access to an Azure Event Hub with the necessary permissions, the minimum permission being `Listen`. You can configure resources' Diagnostic settings to send logs to the Azure Event Hub. Read more here: [Azure Event Hub](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings).

Each event hub should only accept one telemetry type.

### Supported Platforms

Bindplane Collector: `v1.39.0`+

| Platform            | Metrics | Logs | Traces |
| ------------------- | ------- | ---- | ------ |
| Linux               | ✓       | ✓    |        |
| Windows             | ✓       | ✓    |        |
| macOS               | ✓       | ✓    |        |
| Kubernetes Cluster  | ✓       | ✓    |        |
| OpenShift 4 Cluster | ✓       | ✓    |        |

### Configuration

<table><thead><tr><th width="154.57421875">Field</th><th>Description</th></tr></thead><tbody><tr><td>Telemetry Type</td><td>The type of telemetry to gather with this receiver.</td></tr><tr><td>Connection</td><td>A string describing the connection to an Azure event hub.</td></tr><tr><td>Consumer Group</td><td>The Consumer Group to read from. Defaults to <code>$$Default</code>. Dollar signs must be escaped with another dollar sign.</td></tr><tr><td>Partition</td><td>The partition to watch. If empty, it will watch all partitions.</td></tr><tr><td>Offset</td><td>The offset at which to start watching the event hub. If empty, starts with the latest offset.</td></tr><tr><td>Log Format</td><td>The log format to use when parsing logs from Event Hub. Must be one of <code>azure</code> or <code>raw</code>. Raw logs are byte encoded, see the "Raw Encoding" option.</td></tr><tr><td>Raw Encoding</td><td>The encoding used when decoding the raw logs into human readable text. Defaults to <code>utf-8</code>. The raw byte encoding can be preserved by selected <code>byte</code>.</td></tr></tbody></table>

### Example Configuration

#### Basic Configuration

For basic configuration, the `connection` parameter is required. Optionally, specify `consumer group`, `partition`, and `offset`.

**Web Interface**

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2Fgit-blob-b314bc483f1a6611db04ff982240e8cc15db4f50%2Fintegrations-sources-azure-event-hub-image-1.png?alt=media" alt="Bindplane docs - Azure Event Hub - image 1"><figcaption></figcaption></figure>

**Standalone Source**

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Source
metadata:
  id: azure_event_hub
  name: azure_event_hub
spec:
  type: azure_event_hub
  parameters:
    - name: telemetry_types
      value: Logs
    - name: connection
      value: '<your_connection_string>'
    - name: group
      value: '$Default' # optional
    - name: partition
      value: '1' # optional
    - name: offset
      value: '-1' # optional
```


---

# 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.bindplane.com/integrations/sources/azure-event-hub.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.
