Loading...
Loading...
Query Oodle metrics, discover labels and values, and build PromQL expressions using the label discovery workflow.
npx skill4agent add oodle-ai/agent-skills oodle-metricsbrew install oodle-ai/oodle/oodle
oodle configureoodle metrics list --limit 5 -o json | jq 'length'oodle metrics list --match <prefix>oodle metrics labels <name>oodle metrics label-values <name> <label>| Task | Command |
|---|---|
| List metric names (filtered) | |
| List metric names (paged) | |
| Get one metric's metadata | |
| List labels for a metric | |
| List values for a label | |
# Step 1 — find the metric name
oodle metrics list --match "http_requests" -o json
# returns e.g. ["http_requests_total", "http_requests_in_flight"]
# Step 2 — list available labels
oodle metrics labels http_requests_total
# returns e.g. ["service", "method", "status", "env"]
# Step 3 — list values for a label
oodle metrics label-values http_requests_total service
# returns e.g. ["api", "checkout", "auth"]# ✅ CORRECT — query built from confirmed labels and values
sum by (service) (rate(http_requests_total{service="api",env="prod",status=~"5.."}[5m]))
# ❌ WRONG — guessing label names; query returns no data
sum by (svc) (rate(http_requests{app="api",environment="production",http_status=~"5.."}[5m]))# ✅ CORRECT — narrow with --match
oodle metrics list --match "http_requests" -o json
# ✅ CORRECT — page with --limit when sweeping a namespace
oodle metrics list --match "kube_" --limit 200 -o json
# ❌ WRONG — listing every metric in the system, then grepping
oodle metrics list -o json | jq '.[] | select(. | contains("http"))'# ✅ CORRECT — confirm `service` has <100 values before grouping by it
oodle metrics label-values http_requests_total service | wc -l
# ❌ WRONG — grouping by a high-cardinality label like `request_id` melts the query
sum by (request_id) (rate(http_requests_total[5m]))--match <prefix>oodle metrics list# ✅ CORRECT
oodle metrics list --match "http_requests" -o json
# ❌ WRONG — returns thousands of results, may time out
oodle metrics list -o json# ✅ CORRECT — labels confirmed by step 2, values confirmed by step 3
oodle metrics labels http_requests_total
oodle metrics label-values http_requests_total service
sum by (service) (rate(http_requests_total{service="api"}[5m]))
# ❌ WRONG — writing the query first, then debugging "why is it empty?"
sum by (service_name) (rate(http_request_count{service_name="api"}[5m]))jq# ✅ CORRECT
oodle metrics list --match "http_" -o json | jq -r '.[]'
# ❌ WRONG
oodle metrics list --match "http_" | tail -n +2 | awk '{print $1}'rate(...[5m])rate(...[1m])[1m]# ✅ CORRECT
sum by (service) (rate(http_requests_total[5m]))
# ❌ WRONG — flapping graphs, false alerts when a single scrape is missed
sum by (service) (rate(http_requests_total[1m]))| Error | Cause | Fix |
|---|---|---|
| 401 Unauthorized | Invalid or missing API key | Run |
| 404 Not Found | Metric name does not exist | Run |
| connection refused | Wrong | Check |
| Empty result from a query | Wrong label name or wrong label value | Re-run step 2 ( |
| Query timeout | Cardinality too high (e.g. | Drop high-cardinality labels from |
| Broken PromQL syntax | Validate the expression in the UI metrics explorer first |
| 429 Too Many Requests | Heavy concurrent label-values calls | Add |