Skip to content

VictoriaLogs

Connect HolmesGPT to VictoriaLogs for log analysis. Provides search, stream discovery, and field-value enumeration over your log database using LogsQL.

When to Use This

  • ✅ You aggregate logs in VictoriaLogs
  • ✅ You want HolmesGPT to query historical logs by stream label, field, or text
  • ✅ You need to inspect log distributions over time (hits/buckets)

Prerequisites

  • A reachable VictoriaLogs HTTP endpoint (default port: 9428)
Available Log Sources

Multiple logging toolsets can be enabled simultaneously. HolmesGPT will use the most appropriate source for each investigation.

Configuration

Add the following to ~/.holmes/config.yaml. Create the file if it doesn't exist:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: http://victorialogs.monitoring.svc:9428

When using the standalone Holmes Helm Chart, update your values.yaml:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: http://victorialogs.monitoring.svc:9428

Apply the configuration:

helm upgrade holmes holmes/holmes --values=values.yaml

When using the Robusta Helm Chart (which includes HolmesGPT), update your generated_values.yaml:

holmes:
  toolsets:
    victorialogs:
      enabled: true
      config:
        api_url: http://victorialogs.monitoring.svc:9428

Apply the configuration:

helm upgrade robusta robusta/robusta --values=generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME>

Authentication

VictoriaLogs supports basic authentication and bearer tokens.

Basic auth:

Add the following to ~/.holmes/config.yaml. Create the file if it doesn't exist:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: https://victorialogs.example.com
      username: holmes
      password: "{{ env.VICTORIALOGS_PASSWORD }}"

When using the standalone Holmes Helm Chart, update your values.yaml:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: https://victorialogs.example.com
      username: holmes
      password: "{{ env.VICTORIALOGS_PASSWORD }}"

Apply the configuration:

helm upgrade holmes holmes/holmes --values=values.yaml

When using the Robusta Helm Chart (which includes HolmesGPT), update your generated_values.yaml:

holmes:
  toolsets:
    victorialogs:
      enabled: true
      config:
        api_url: https://victorialogs.example.com
        username: holmes
        password: "{{ env.VICTORIALOGS_PASSWORD }}"

Apply the configuration:

helm upgrade robusta robusta/robusta --values=generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME>

Bearer token:

Add the following to ~/.holmes/config.yaml. Create the file if it doesn't exist:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: https://victorialogs.example.com
      bearer_token: "{{ env.VICTORIALOGS_TOKEN }}"

When using the standalone Holmes Helm Chart, update your values.yaml:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: https://victorialogs.example.com
      bearer_token: "{{ env.VICTORIALOGS_TOKEN }}"

Apply the configuration:

helm upgrade holmes holmes/holmes --values=values.yaml

When using the Robusta Helm Chart (which includes HolmesGPT), update your generated_values.yaml:

holmes:
  toolsets:
    victorialogs:
      enabled: true
      config:
        api_url: https://victorialogs.example.com
        bearer_token: "{{ env.VICTORIALOGS_TOKEN }}"

Apply the configuration:

helm upgrade robusta robusta/robusta --values=generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME>

Multi-tenancy

VictoriaLogs uses AccountID and ProjectID headers for tenant routing. Set them via headers:

Add the following to ~/.holmes/config.yaml. Create the file if it doesn't exist:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: https://victorialogs.example.com
      headers:
        AccountID: "0"
        ProjectID: "0"

When using the standalone Holmes Helm Chart, update your values.yaml:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: https://victorialogs.example.com
      headers:
        AccountID: "0"
        ProjectID: "0"

Apply the configuration:

helm upgrade holmes holmes/holmes --values=values.yaml

When using the Robusta Helm Chart (which includes HolmesGPT), update your generated_values.yaml:

holmes:
  toolsets:
    victorialogs:
      enabled: true
      config:
        api_url: https://victorialogs.example.com
        headers:
          AccountID: "0"
          ProjectID: "0"

Apply the configuration:

helm upgrade robusta robusta/robusta --values=generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME>

If HolmesGPT calls an internal API URL but you want results to link to a public dashboard:

Add the following to ~/.holmes/config.yaml. Create the file if it doesn't exist:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: http://victorialogs.internal:9428
      external_url: https://logs.example.com

When using the standalone Holmes Helm Chart, update your values.yaml:

toolsets:
  victorialogs:
    enabled: true
    config:
      api_url: http://victorialogs.internal:9428
      external_url: https://logs.example.com

Apply the configuration:

helm upgrade holmes holmes/holmes --values=values.yaml

When using the Robusta Helm Chart (which includes HolmesGPT), update your generated_values.yaml:

holmes:
  toolsets:
    victorialogs:
      enabled: true
      config:
        api_url: http://victorialogs.internal:9428
        external_url: https://logs.example.com

Apply the configuration:

helm upgrade robusta robusta/robusta --values=generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME>

Multiple Instances

The VictoriaLogs toolset can connect to more than one VictoriaLogs instance. List each one under instances: with a unique name. Any config field set outside instances: becomes a default that every instance inherits, so shared settings only need to be written once.

toolsets:
  victorialogs:
    enabled: true
    config:
      instances:
        - name: prod
          api_url: http://victorialogs.monitoring.svc:9428
        - name: staging
          api_url: http://victorialogs.monitoring.svc:9428

When more than one instance is configured, HolmesGPT automatically adds an instance parameter to every VictoriaLogs tool (so it can pick which instance to query) and a victorialogs_list_instances tool to list the configured instances. With a single instance — including the flat config without instances: — the tools are unchanged and fully backwards compatible.

See Multiple Instances for the full behaviour, including global defaults and health reporting.

Common Use Cases

Show error logs for the checkout service in the last 30 minutes
Which services produced the most errors in the last hour?
List the streams in namespace "payments" between 10:00 and 11:00 UTC