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

# VictoriaLogs

Connect ResolveAI to VictoriaMetrics to query logs either from the Cloud UI for from the [Resolve Satellite](/resolve-satellite).

## Connect from the Resolve UI

1. Log in to the ResolveAI app [https://app0.resolve.ai](https://app0.resolve.ai)
2. Open the integrations page [https://app0.resolve.ai/integrations](https://app0.resolve.ai/integrations)
3. Click **Add Connection**
4. **Name** the connection, ex `Production VictoriaLogs`
5. Pick **Environments** Resolve should query, ex. `production` and `staging`
6. Enter the **URL** for your VictoriaMetrics instance
7. Optional: Use **Advanced Settings** to specify authentication details

Recommended:

1. In VictoriaMetrics, create a read-only API key.

<p align="center">
  <img src="https://mintcdn.com/resolveai-0e94a547/TSKPziqa8xE8YA7n/images/victorialogs-api-key.png?fit=max&auto=format&n=TSKPziqa8xE8YA7n&q=85&s=08966f7dfdb52069de36b3328f1b61c1" alt="VictoriaLogs API Key" width="50%" data-path="images/victorialogs-api-key.png" />
</p>

2. In ResolveAI open [VictoriaLogs](https://app0.resolve.ai/integrations/victoriaLogs/connect), click Edit, and open Advanced Settings.
3. **Auth Type** pick `bearer`.
4. **Token** enter your API key.

<p align="center">
  <img src="https://mintcdn.com/resolveai-0e94a547/TSKPziqa8xE8YA7n/images/victorialogs-bearer.png?fit=max&auto=format&n=TSKPziqa8xE8YA7n&q=85&s=be5bbbcc18999afcdafa9e5b725a4189" alt="VictoriaLogs Auth in ResolveAI" width="50%" data-path="images/victorialogs-bearer.png" />
</p>

5. Click Save at the bottom of the page.

## Connect from the Resolve Satellite

Before setting up this integration, ensure the [Resolve Satellite](/resolve-satellite) is installed in your environment.

Below is an example of how to setup the integration in the satellite with a Kubernetes secret (potentially backed by an AWS secret manager or another mechanism) for authentication if you are running VictoriaMetrics Enterprise.

<Steps>
  <Step title="Configure your integration in the Resolve Satellite">
    Update your helm values override file with the following information (e.g.: *resolve-values.yaml*)

    ```yaml resolve-values.yaml theme={null}
    integrations:
      victoriaMetricsIntegration:
        type: prometheus
        create: true
        connection:
          url: "<your VictoriaMetrics URL>"
    ```

    Install the satellite and apply the values from the yaml file that you have just updated. e.g.: *resolve-values.yaml.* To find the latest version, visit ResolveAI's docker hub repository for the [helm chart](https://hub.docker.com/r/resolveaihq/satellite-chart/tags) and [satellite image](https://hub.docker.com/r/resolveaihq/satellite/tags).

    ```shell apply config to satellite and redeploy theme={null}
    helm upgrade --install oci://registry-1.docker.io/resolveaihq/satellite-chart --version <LatestChart> --values resolve-values.yaml --set image.tag=<LatestImage>
    ```

    Once your satellite is deployed, we will automatically create an integration instance for you.
  </Step>

  <Step title="Verify your integration status in ResolveAI">
    Login to [https://app0.resolve.ai/](https://app0.resolve.ai/). Go to the integrations page and and select “Prometehus”

    You should see an automatically created integration based on the provided configuration.
  </Step>
</Steps>

## Authentication for VictoriaMetrics Enterprise

<Warning>
  **Note:** If you are using VictoriaMetrics Enterprise follow the example below, to setup an auth token for the integration.
</Warning>

<Steps>
  <Step title="Create a Kubernetes secret">
    Create a Kubernetes secret of the following form. Note that the structure of the secret is important. Set the top-level key "token" and put your actual token in the value.

    ```yaml secret creation theme={null}
    apiVersion: v1
    kind: Secret
    type: Opaque
    metadata:
      name:  vm-resolve-access-token
    stringData:
      token: "<your auth token>"
    ```

    <Warning>
      **Security Best Practice:** Never store credentials in plaintext in configuration files or source control.
      Always use Kubernetes secrets and encrypt etcd or use enterprise secret management systems.
      See [Secret Management](/secret-management) for detailed guidance.
    </Warning>

    To apply the secret run

    ```shell apply secret theme={null}
    kubectl apply -f vm-resolve-access-token.yml
    ```
  </Step>

  <Step title="Use the token in your configuration (as shown above)">
    Update your helm values override file with the following information (e.g.: *resolve-values.yaml*)

    ```yaml resolve-values.yaml theme={null}
    integrations:
      victoriaMetricsIntegration:
        type: prometheus
        create: true
        connection:
          url: "<your VictoriaMetrics URL>"
    ```
  </Step>
</Steps>
