skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
oodle-ai/agent-skills96 installs

oodle-metrics-query

Execute PromQL instant and range queries against Oodle metrics using the Prometheus-compatible query API.

How do I install this agent skill?

npx skills add https://github.com/oodle-ai/agent-skills --skill oodle-metrics-query
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides legitimate instructions for querying metrics using the Oodle CLI. No security risks or malicious patterns were identified in the analysis.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Oodle Metrics Query — PromQL Instant and Range Queries

This skill teaches the agent to execute PromQL instant and range queries against Oodle metrics using the Prometheus-compatible query API.

Prerequisites

brew install oodle-ai/oodle/oodle
oodle configure

Confirm the query endpoint works:

oodle metrics query --query "up" -o json | jq '.status'

Command Execution Order

Before running any query command:

  1. Check whether the required metric name is already known.
  2. If not, run oodle metrics names --start -1h --end now to discover metric names.
  3. Run oodle metrics labels <name> --start -1h --end now to discover available labels.
  4. Build the PromQL expression using only confirmed metric names and labels.
  5. Do not run speculative queries — always confirm metric and label existence first.

Quick Reference

TaskCommand
Instant PromQL queryoodle metrics query --query "sum(up)" -o json
Instant query at specific timeoodle metrics query --query "up" --time 1700000000 -o json
Range PromQL queryoodle metrics query-range --query "rate(http_requests_total[5m])" --start -1h --end now --step 60s -o json
Range query with partial responseoodle metrics query-range --query "up" --start -1h --end now --step 60s --partial-response -o json

Common Operations

Instant query

Evaluate a PromQL expression at a single point in time. Returns the current value by default, or the value at a specific timestamp.

# CORRECT — instant query with JSON output for scripting
oodle metrics query --query "sum(up)" -o json

# CORRECT — instant query at a specific time
oodle metrics query --query "up{job=\"prometheus\"}" --time 1700000000 -o json

# CORRECT — use relative time
oodle metrics query --query "up" --time -5m -o json

# WRONG — omitting --query flag
oodle metrics query -o json

Range query

Evaluate a PromQL expression over a time range. All four flags (--query, --start, --end, --step) are required.

# CORRECT — range query over the last hour with 60-second resolution
oodle metrics query-range --query "rate(http_requests_total[5m])" --start -1h --end now --step 60s -o json

# CORRECT — range query with absolute timestamps
oodle metrics query-range --query "up" --start 1700000000 --end 1700003600 --step 60s -o json

# CORRECT — enable partial response for degraded-mode queries
oodle metrics query-range --query "up" --start -1h --end now --step 60s --partial-response -o json

# WRONG — missing --step flag
oodle metrics query-range --query "up" --start -1h --end now -o json

# WRONG — missing --start or --end
oodle metrics query-range --query "up" --step 60s -o json

Best Practices

Use oodle metrics to discover before querying

Always confirm metric names and labels exist before building a PromQL query. Querying a nonexistent metric returns empty results, not an error.

# CORRECT — discover first, then query
oodle metrics names --start -1h --end now -o json | jq '.[] | select(startswith("http"))'
oodle metrics labels http_requests_total --start -1h --end now
oodle metrics query --query "sum(rate(http_requests_total[5m]))" -o json

# WRONG — guessing metric names
oodle metrics query --query "sum(rate(requests_total[5m]))" -o json

Choose the right step for range queries

The step determines the resolution of the returned time series. Too small a step returns excessive data; too large a step misses detail.

# CORRECT — 60s step for a 1-hour window (60 data points)
oodle metrics query-range --query "up" --start -1h --end now --step 60s -o json

# CORRECT — 5m step for a 24-hour window (288 data points)
oodle metrics query-range --query "up" --start -1d --end now --step 5m -o json

# WRONG — 1s step for a 24-hour window (86400 data points — too many)
oodle metrics query-range --query "up" --start -1d --end now --step 1s -o json

Failure Handling

ErrorCauseFix
401 UnauthorizedInvalid or missing API keyRun oodle configure or set OODLE_API_KEY
400 Bad RequestInvalid PromQL expressionCheck syntax at https://prometheus.io/docs/prometheus/latest/querying/basics/
Empty result (not an error)Metric does not exist or no data in time rangeRun oodle metrics names to verify the metric exists; widen the time range
connection refusedWrong OODLE_DEPLOYMENT URLCheck OODLE_DEPLOYMENT env var, ensure no trailing slash
429 Too Many RequestsRate limitedAdd --retries 3, back off, reduce query frequency
required flag "step"Missing required flag for range queryAdd --step flag (e.g. --step 60s)
required flag "query"Missing required flagAdd --query flag with a PromQL expression

References

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/oodle-ai/agent-skills/oodle-metrics-query">View oodle-metrics-query on skillZs</a>