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

# Elasticsearch

> Connect Elasticsearch to query log indices during investigations.

Connecting Elasticsearch lets Traversal query your log indices and use the results as evidence during investigations.

## What Traversal reads

* **Logs**: documents queried from your log indices

## Setup

> [tab] Elastic Cloud
>
> **1. Find your Elasticsearch endpoint**
>
> In your Elastic Cloud project, click the **Help** icon (top right) and select **Connection details**. Copy the **Elasticsearch endpoint** URL (for example, `https://my-project-XXXX.es.us-central1.gcp.elastic.cloud`).
>
> ![Finding Connection details in Elastic Cloud](https://mintcdn.com/traversal-ff380fca/qGhvpikajw9E7hhH/images/elasticsearch-connection-details.png?fit=max\&auto=format\&n=qGhvpikajw9E7hhH\&q=85\&s=d95d131f1a835c7530524fdd5cb3139b)
>
> **2. Create an API key**
>
> Go to **Settings** → **Access** → **API keys** and click **Create API key**. Give it read access to the indices Traversal should query.
>
> > [!NOTE]
> >
> > Create a user API key, not a cross-cluster API key.
>
> After creation, Elastic shows a single encoded API key value. Copy it.
>
> **3. Configure in Traversal**
>
> Go to **Integrations**, select **Elasticsearch**, and enter:
>
> * **Host**: the Elasticsearch endpoint you copied
> * **Authentication**: select **API Key** and paste the encoded key

> [tab] Self-managed
>
> **1. Find your Elasticsearch endpoint**
>
> Identify your Elasticsearch host URL (for example, `https://elasticsearch.mycompany.com:9200`).
>
> **2. Choose an authentication method**
>
> > [tab] Username and password
> >
> > Use the username and password of a user with read access to the indices Traversal should query.
>
> > [tab] API key
> >
> > In Kibana, go to **Stack Management** → **Security** → **API keys** and click **Create API key**. Give it read access to the indices Traversal should query.
> >
> > If Elastic shows you a single encoded API key value, paste it into **API Key** in Traversal.
>
> > [tab] API key ID and secret
> >
> > If Elastic shows you separate `id` and `api_key` values after creation, select **API Key with ID** in Traversal and enter both values.
>
> **3. Configure in Traversal**
>
> Go to **Integrations**, select **Elasticsearch**, and enter your host URL and chosen credentials.
>
> If the integration doesn't work as expected, check the following:
>
> * You entered the Elasticsearch endpoint URL, not a Kibana URL
> * You selected the authentication method that matches the credential you created
> * The user or API key has read access to the log indices Traversal should query

## Private network access

If the service endpoint isn't directly reachable by Traversal (as is common with self-hosted services), deploy a [Traversal Connector](https://docs.traversal.com/architecture/connector.md) in a network that can reach it. When configuring the integration, select that connector under **Network Access Needed**. The service endpoint doesn't need public internet exposure.

See [Set up the Traversal Connector](https://docs.traversal.com/setup/connector.md) for deployment and network requirements.

## More information

* [Elasticsearch API keys](https://www.elastic.co/docs/deploy-manage/api-keys/elasticsearch-api-keys)


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