> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sazabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Grafana Alloy

> Add an otelcol.exporter.otlphttp component to your Grafana Alloy pipeline to forward logs and traces from your infrastructure to Sazabi.

[All Grafana Alloy integration capabilities](https://docs.sazabi.com/catalogs/integrations/grafana-alloy)

## About

Add a Sazabi OTLP exporter to your Grafana Alloy pipeline to forward logs and traces from any existing `otelcol.*` receiver. Alloy is OpenTelemetry-native, so Sazabi acts as an additional `otelcol.exporter.otlphttp` destination alongside any existing exporters.

Metrics are not stored by this source. Use [OpenTelemetry Metrics](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/opentelemetry-metrics.md) for metric data.

> [!WARNING]
>
> Only `otelcol.*` components are compatible with the Sazabi exporter. Loki sources (`loki.source.*`) are not OTLP-compatible and cannot route through `otelcol.exporter.otlphttp`.

## Prerequisites

* A running Grafana Alloy deployment (Kubernetes DaemonSet or standalone)
* Your Sazabi intake URL, shown above — open the log source and copy the **Intake URL** from its setup screen (the public key is embedded in the URL)

## Set up in the dashboard

**Step 1**

### Add the Sazabi exporter to your Alloy config

Add an `otelcol.exporter.otlphttp "sazabi"` block to your `config.alloy` and wire it into your existing pipeline:

```hcl title="config.alloy" theme={"system"}
otelcol.receiver.otlp "default" {
  grpc { endpoint = "0.0.0.0:4317" }
  http { endpoint = "0.0.0.0:4318" }

  output {
    logs   = [otelcol.processor.batch.default.input]
    traces = [otelcol.processor.batch.default.input]
  }
}

otelcol.processor.batch "default" {
  output {
    logs   = [otelcol.exporter.otlphttp.sazabi.input]
    traces = [otelcol.exporter.otlphttp.sazabi.input]
  }
}

otelcol.exporter.otlphttp "sazabi" {
  client {
    endpoint = "<your intake URL>"
  }
}
```

Replace `<your intake URL>` with the intake URL shown above. No additional authentication headers are required — the public key is encoded in the URL hostname.

For Kubernetes deployments using Helm, add the exporter block under `alloy.configMap.content` in your values file and update the pipeline output references.

**Step 2**

### Wire your actual receivers

Replace the example `otelcol.receiver.otlp` block with the receivers your infrastructure uses. Common options:

* **Kubernetes pod logs** — use `otelcol.receiver.filelog` pointed at `/var/log/pods`
* **Application traces** — use `otelcol.receiver.otlp` or `otelcol.receiver.jaeger`
* **Host metrics** — use `otelcol.receiver.hostmetrics` (metrics will not be stored; use OpenTelemetry Metrics for that output)

You can route logs and traces to multiple exporters by listing them in the `output` block.

**Step 3**

### Hand off the change

If this configuration is version-controlled, commit it on a new branch, push it, and open a pull request. Otherwise apply it directly to your Alloy deployment. Keep the intake URL and any keys in environment variables or a secret store, and commit only configuration that references them.

## Set up with the CLI

You can also register the Grafana Alloy log source with the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) (installed and authenticated — see [CLI reference](https://docs.sazabi.com/reference/cli/log-sources.md)).

Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):

```bash theme={"system"}
sazabi log-sources create grafana_alloy --mode manual
```

The command prints the intake URL for the new source — copy the whole URL and point your sender at it using the configuration shown above. Run `sazabi log-sources get <log-source-id>` at any time to reprint the endpoint, or `sazabi log-sources list` to see every log source in the project.

## Verify

Restart or redeploy Alloy after updating the configuration. Open the [Intake page](https://docs.sazabi.com/guides/instrument/intake.md) in the Sazabi dashboard and confirm records from the **Grafana Alloy** source appear within a minute or two.

## Troubleshooting

**No records after redeploying** — Check Alloy logs for errors on the `otelcol.exporter.otlphttp.sazabi` component. Confirm the intake URL starts with `https://` and is the full URL from above.

**Logs arrive but traces do not** — Verify the `traces` output in your processor or receiver references `otelcol.exporter.otlphttp.sazabi.input`.

**Loki sources not forwarding** — `loki.source.*` components are not OTLP-compatible. Convert them to `otelcol.receiver.filelog` or another `otelcol.*` receiver to route through the Sazabi exporter.

**Metrics are not stored** — This source does not store OpenTelemetry metrics. Use [OpenTelemetry Metrics](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/opentelemetry-metrics.md) for a metrics pipeline.

## Further reading

> [card] [Intake](https://docs.sazabi.com/guides/instrument/intake.md)
>
> See per-source ingestion volume and health.

> [card] [Log sources](https://docs.sazabi.com/catalogs/log-sources.md)
>
> Browse the full log source catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.