# Kibana

Kibana is a data visualization dashboard software for Elasticsearch.

In order to integrate Kibana with Relyance AI you will need an **API Server** URL and an **API Key** with permissions.

**In Kibana:**

1. Choose the Kibana deployment you wish to use and click **Manage this Deployment** from the upper left menu.
2. Under Applications > Kibana, click **Copy endpoint** to copy the Kibana API Server URL; record this value for later entry in Relyance.
3. Click **Open** to open Kibana.
4. In the left menu, scroll down to Management and click **Stack Management**.
5. In the left menu, under Security, click **API keys**.
6. Click the **+ Create API Key** button in the upper right.
7. Create an API key by giving it a name, selecting *User API Key*, and leaving the other fields with default values. Click the **Create API Key** button in the lower right.
8. You'll be returned to the API Key screen; click the copy icon beside the API key that was just generated. Record this value for later use in Relyance.

![Screenshot](https://assets.relyanceuat.xyz/images/docs/28900777220493/28900777164941.png)

![Screenshot](https://assets.relyanceuat.xyz/images/docs/28900777220493/28900785497357.png)

![Screenshot](https://assets.relyanceuat.xyz/images/docs/28900777220493/28900777191437.png)

![Screenshot](https://assets.relyanceuat.xyz/images/docs/28900777220493/28900785509261.png)

![Screenshot](https://assets.relyanceuat.xyz/images/docs/28900777220493/28900785514509.png)

**In Relyance AI:**

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Find the *Kibana* integration card and click it to open its connections.
5. On the **Authentication** step, pick the method under **Authentication Method**.

    The **Authentication** step asks for:

    - **API Server**: required.
    - **API Key**: required; held as a secret.
6. Choose **Custom** under **Authentication Method**.
7. Paste the *API Server* URL and *API Key* collected from the Kibana steps above into their respective fields.
8. If you wish, select the *Data Inspection* (to sample and classify actual data values; or leave off to only test API endpoint properties) and *Vendor Discovery* (to discover other 3rd-party apps integrated to Kibana).
9. Click **Authenticate**.
10. At this point, you should see the following result on the Integrations page:

![Screenshot](https://assets.relyanceuat.xyz/images/docs/28900777220493/28900777204365.png)

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

```hcl
resource "relyance_integration_connection" "elasticsearch_kibana" {
  vendor = "elasticsearch_kibana"
  name   = "<your connection name>"

  auth = {
    method = "api-key"
    params = {
      api_server = "<api_server>"
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      api_key = var.elasticsearch_kibana_api_key
    }
    secrets_wo_version = 1
  }

  scans = { "data-inspection" = { enabled = true } }
}
```

<!-- terraform-examples:end -->
