Prometheus Query Skill
Query Prometheus metrics to analyze system performance, troubleshoot issues, and verify SLOs.
When to Use This Skill
- •Need to check metrics for a service
- •Investigating performance degradation
- •Verifying SLO compliance
- •Analyzing historical trends
- •Debugging autoscaling decisions
Steps
- •Query current value —
curl 'http://prometheus:9090/api/v1/query?query=...' - •Query range — Use start/end timestamps for historical data
- •Execute PromQL — Use expressions like
rate(requests[5m]) - •Parse results — Extract value and timestamp with jq
- •Analyze trend — Check for increasing/decreasing patterns