Skip to content

Prometheus

Connect HolmesGPT to Prometheus for metrics analysis and query generation. Enables detection of memory leaks, CPU throttling, queue backlogs, and performance issues.

Prerequisites

  • Prometheus server running and accessible
  • Network connectivity from HolmesGPT to Prometheus endpoint

Configuration

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

toolsets:
    prometheus/metrics:
        enabled: true
        config:
            prometheus_url: http://prometheus-server:9090

            # optional
            #headers:
            #    Authorization: "Basic <base_64_encoded_string>"
holmes:
    toolsets:
        prometheus/metrics:
            enabled: true
            config:
                prometheus_url: http://prometheus-server:9090

                # optional
                #headers:
                #    Authorization: "Basic <base_64_encoded_string>"

Update your Helm values and run a Helm upgrade:

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

💡 Alternative: Set PROMETHEUS_URL environment variable instead of the config file.

Validation

Test your connection:

holmes ask "show me CPU usage for the last hour"

Troubleshooting

Finding Your Prometheus URL

# Find Prometheus services
kubectl get svc -A | grep prometheus

# Port forward for testing
kubectl port-forward svc/prometheus-server 9090:80
# Then use: http://localhost:9090

Common Issues

  • Connection refused: Check if Prometheus URL is accessible from HolmesGPT
  • Authentication errors: Verify headers configuration for secured Prometheus
  • No metrics returned: Ensure Prometheus is scraping your targets

Capabilities

Tool Name Description
list_available_metrics List all available Prometheus metrics
execute_prometheus_instant_query Execute an instant PromQL query
execute_prometheus_range_query Execute a range PromQL query for time series data
get_current_time Get current timestamp for time-based queries