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

# Glean

> Sync Rootly incident data to Glean so your team can search incidents, schedules, alerts, and retrospectives alongside the rest of your company knowledge.

## Introduction

The Rootly–Glean connector is an open-source Python project that syncs Rootly data into Glean's unified search index. Once running, your team can search for incidents, on-call schedules, alerts, escalation policies, and retrospectives directly in Glean alongside all other company knowledge.

The connector syncs the following Rootly data types:

| Data Type               | What's included                                                        |
| ----------------------- | ---------------------------------------------------------------------- |
| **Incidents**           | Active and resolved incidents with severity, status, and timeline data |
| **Alerts**              | Alert configurations and monitoring rules                              |
| **Schedules**           | On-call schedules with rotations, shifts, and user assignments         |
| **Escalation Policies** | Escalation rules and notification chains                               |
| **Retrospectives**      | Post-incident analysis links                                           |

<Callout icon="circle-info" color="#DBEAFE">
  This is a connector-based integration — data flows from Rootly into Glean for search purposes. It runs as a standalone Python service, separate from the Rootly web UI. There is no account setup required within Rootly.
</Callout>

## Before You Begin

Before setting up the connector, make sure you have:

* **Python 3.13 or higher** — install via Homebrew on macOS: `brew install python@3.13`
* A **Rootly API token** — generate one in **Account** > **Manage API keys** > **Generate New API Key**
* A **Glean API token** — obtain from your Glean admin
* Your **Glean API host** — the hostname of your Glean instance (for example, `your-company-be.glean.com`)

## Installation

<Steps>
  <Step title="Clone the connector repository" icon="code-branch">
    ```bash theme={null}
    git clone https://github.com/rootlyhq/rootly-glean-connector.git
    cd rootly-glean-connector
    ```
  </Step>

  <Step title="Set up a Python virtual environment" icon="terminal">
    ```bash theme={null}
    python -m venv venv
    source venv/bin/activate
    ```
  </Step>

  <Step title="Install dependencies" icon="download">
    ```bash theme={null}
    pip install -r requirements.txt
    ```
  </Step>

  <Step title="Create your secrets file" icon="key">
    Create a `secrets.env` file in the project root with your API tokens:

    ```bash theme={null}
    GLEAN_API_TOKEN=your_glean_api_token_here
    ROOTLY_API_TOKEN=your_rootly_api_token_here
    ```

    This file is not committed to version control.
  </Step>

  <Step title="Configure the connector" icon="gear">
    Edit `config.json` to match your environment. At minimum, update the `glean.api_host` value to your Glean instance hostname:

    ```json theme={null}
    {
      "glean": {
        "api_host": "support-lab-be.glean.com"
      }
    }
    ```

    See [Configuration](#configuration) below for all available options.
  </Step>

  <Step title="Run the connector" icon="circle-check">
    ```bash theme={null}
    python app.py
    ```

    <Callout icon="circle-check" color="#DCFCE7">
      The connector is running and syncing Rootly data to Glean. Your team can now search for incidents, schedules, and more directly in Glean.
    </Callout>
  </Step>
</Steps>

## Configuration

All configuration lives in two files:

* **`config.json`** — non-sensitive settings (data types, limits, sync behavior)
* **`secrets.env`** — API tokens (keep this out of version control)

Key `config.json` options:

| Setting                    | Description                                                                                         |
| -------------------------- | --------------------------------------------------------------------------------------------------- |
| `glean.api_host`           | Your Glean instance hostname (default: `support-lab-be.glean.com`)                                  |
| Data type toggles          | Enable or disable syncing for incidents, alerts, schedules, escalation policies, and retrospectives |
| Item limits                | Maximum items to sync per data type                                                                 |
| Enhanced incident features | Include timeline events and action items in incident documents                                      |
| Logging level              | Set verbosity for debugging                                                                         |
| Sync interval              | How frequently the connector polls Rootly for updates                                               |

## Searching Rootly Data in Glean

Once the connector has synced, your team can search for Rootly data in Glean using natural language:

**Incidents**

* *"Find incidents with timeline events"*
* *"Show high severity resolved incidents"*

**Schedules & On-Call**

* *"Show the latest on-call schedule in Rootly"*

**Alerts**

* *"Show the latest alerts in Rootly"*

## Architecture

The connector is organized into four modules:

| Module              | Purpose                                                        |
| ------------------- | -------------------------------------------------------------- |
| `data_fetchers/`    | API clients that pull each Rootly data type via the Rootly API |
| `document_mappers/` | Converts Rootly data into the Glean document format            |
| `processors/`       | Coordinates sync orchestration across data types               |
| `glean_schema/`     | Glean document schema definitions                              |

This structure makes it straightforward to extend the connector — for example, to add a new Rootly data type, add a fetcher and a mapper for it.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The connector fails to start" icon="terminal">
    Confirm Python 3.13+ is installed (`python --version`) and the virtual environment is activated (`source venv/bin/activate`). Make sure dependencies are installed with `pip install -r requirements.txt`.
  </Accordion>

  <Accordion title="Authentication errors on startup" icon="key">
    Confirm that `secrets.env` exists in the project root and contains valid values for both `GLEAN_API_TOKEN` and `ROOTLY_API_TOKEN`. Check that neither token has been revoked.
  </Accordion>

  <Accordion title="Data is not appearing in Glean search" icon="magnifying-glass">
    Allow a few minutes for Glean to index synced documents. If data still doesn't appear, check the connector logs for errors. Confirm `glean.api_host` in `config.json` matches your Glean instance hostname exactly.
  </Accordion>

  <Accordion title="Some data types are missing" icon="table">
    Each data type (incidents, alerts, schedules, etc.) can be individually enabled or disabled in `config.json`. Confirm the relevant data type is enabled and that your Rootly API token has access to it.
  </Accordion>
</AccordionGroup>

## Related Pages

<CardGroup cols={3}>
  <Card title="Rootly API" icon="code" href="/api-reference/overview">
    The connector uses the Rootly API to fetch data. See the API reference for available endpoints and token setup.
  </Card>

  <Card title="Connector on GitHub" icon="github" href="https://github.com/rootlyhq/rootly-glean-connector">
    Source code, issues, and release notes for the Rootly–Glean connector.
  </Card>

  <Card title="Rootly AI" icon="robot" href="/ai/ai">
    Learn about Rootly's built-in AI features for incident management.
  </Card>
</CardGroup>
