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:
💡 Alternative: Set PROMETHEUS_URL
environment variable instead of the config file.
Validation¶
Test your connection:
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 |