---
title: "Splunk"
description: "Connect Splunk Observability Cloud so the SRE Agent can investigate production errors."
canonical: "https://baz.ai/docs/integrations/observability/splunk"
---

# Splunk

Connect Splunk Observability Cloud so the SRE Agent can investigate production errors.

Connect Splunk Observability Cloud to give the [SRE Agent](/docs/agents/maintain/sre-agent) your production errors. The agent reads the signals for services mapped to your repositories, finds the root cause at the deployed commit, and opens fix pull requests for issues it can fix safely.

## Before you start

You need a Splunk Observability Cloud org access token with the API scope and the `read_only` role, your realm (for example `us0`), and the SRE Agent turned on in **Software Factory → Maintain**, plus write access and a [sandbox](/docs/integrations/sandbox) on the repositories it should fix.

:::warning
Splunk org access tokens expire after 30 days by default, and Baz stops reading Splunk when the token expires. Set a long expiration.
:::

## Connect Splunk

<Steps>
  <Step title="Open the Splunk integration">
    Go to **Settings → Integrations**, select **Observability**, then **Splunk**, and select **Configure**.
  </Step>
  <Step title="Fill in the form">
    In **Create a new Splunk Observability Cloud integration**, choose the **Realm** (`us0`, `us1`, `us2`, `us3`, `eu0`, `eu1`, `eu2`, `jp0`, `au0` or `sg0`) and paste the **Access Token**. Save the form.
  </Step>
  <Step title="Map services to repositories">
    Open the integration's menu, select **SRE Settings**, set **Environments**, and add rows under **Service to repository mapping**.
  </Step>
</Steps>

## Related

<CardGroup cols={2}>
  <Card title="SRE Agent" href="/docs/agents/maintain/sre-agent" icon="siren">
    How production errors become fix pull requests.
  </Card>
  <Card title="Datadog" href="/docs/integrations/observability/datadog" icon="activity">
    Another observability source for the SRE Agent.
  </Card>
</CardGroup>
