> For the complete documentation index, see [llms.txt](https://docs.fluentbit.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluentbit.io/manual/data-pipeline/outputs/azure.md).

# Azure Log Analytics

Send logs, metrics to Azure Log Analytics

The Azure output plugin lets you ingest your records into [Azure Log Analytics](https://azure.microsoft.com/en-us/products/monitor/) service.

For details about how to setup Azure Log Analytics, see the [Azure Log Analytics](https://learn.microsoft.com/en-us/azure/azure-monitor/fundamentals/overview) documentation.

## Configuration parameters

| Key              | Description                                                                                                                                                   | Default      |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| `customer_id`    | Customer ID or WorkspaceID string.                                                                                                                            | *none*       |
| `log_type`       | The name of the event type.                                                                                                                                   | `fluentbit`  |
| `log_type_key`   | If included, the value for this key checked in the record and if present, will overwrite the `log_type`. If not found then the `log_type` value will be used. | *none*       |
| `shared_key`     | The primary or the secondary Connected Sources client authentication key.                                                                                     | *none*       |
| `time_generated` | If enabled, the HTTP request header `time-generated-field` will be included so Azure can override the timestamp with the key specified by `time_key` option.  | `false`      |
| `time_key`       | Optional. Specify the key name where the timestamp will be stored.                                                                                            | `@timestamp` |
| `workers`        | The number of [workers](/manual/administration/multithreading.md#outputs) to perform flush operations for this output.                                        | `0`          |

## Get started

To insert records into an Azure Log Analytics instance, run the plugin from the command line or through the configuration file.

### Command line

The *Azure* plugin can read the parameters from the command line in the following ways, using the `-p` argument (property):

```shell
fluent-bit -i cpu -o azure -p customer_id=abc -p shared_key=def -m '*' -f 1
```

### Configuration file

In your main configuration file append the following sections:

{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:
  inputs:
    - name: cpu

  outputs:
    - name: azure
      match: '*'
      customer_id: abc
      shared_key: def
```

{% endtab %}

{% tab title="fluent-bit.conf" %}

```
[INPUT]
  Name  cpu

[OUTPUT]
  Name        azure
  Match       *
  Customer_ID abc
  Shared_Key  def
```

{% endtab %}
{% endtabs %}

The following example uses the `Log_Type_Key` with [record-accessor](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/record-accessor), which will read the table name (or event type) dynamically from the Kubernetes label `app`, instead of `Log_Type`:

{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:
  inputs:
    - name: cpu

  outputs:
    - name: azure
      match: '*'
      log_type_key: $kubernetes['labels']['app']
      customer_id: abc
      shared_key: def
```

{% endtab %}

{% tab title="fluent-bit.conf" %}

```
[INPUT]
  Name  cpu

[OUTPUT]
  Name        azure
  Match       *
  Log_Type_Key $kubernetes['labels']['app']
  Customer_ID abc
  Shared_Key  def
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fluentbit.io/manual/data-pipeline/outputs/azure.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
