본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트9.5k · #12263

query-metrics

하는 일

이 스킬은 Axiom에 저장된 지표를 검색합니다. 시스템이나 앱의 측정값을 추적하면서 쿼리를 일일이 직접 쓰고 싶지 않은 사람을 위한 것입니다.

사용하는 경우

  • ✓Axiom 데이터셋에 어떤 지표가 있는지 찾고 싶을 때.
  • ✓특정 시간 범위에서 지표 값이 필요할 때.
  • ✓특정 서비스나 호스트 이름이 붙은 지표를 찾고 싶을 때.

스킬 링크

https://github.com/openclaw/clawhub/blob/main/.agents/skills/query-metrics/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/openclaw/clawhub/blob/main/.agents/skills/query-metrics/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“지난 하루 동안 제 API 서비스의 요청 수 지표를 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 지표와 태그를 나열하고, 쿼리 규칙을 읽은 뒤, 선택한 시간 범위에 대해 데이터셋에서 쿼리를 실행합니다. 질문에 답할 때까지 쿼리를 다듬습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Querying Axiom Metrics

All script paths are relative to this skill's folder; invoke as scripts/<name>. The target dataset must be of kind otel:metrics:v1.

Setup, prerequisites, and ~/.axiom.toml configuration: see README.md. Edge-deployment routing is automatic — the scripts read each dataset's edgeDeployment and route to the right regional endpoint without configuration.

Workflow

  1. scripts/datasets <deploy> --kind otel:metrics:v1 — list metrics datasets.
  2. scripts/metrics-spec — required before composing any query. MPL evolves; the spec is the source of truth. Also use it to answer general MPL/metrics questions.
  3. scripts/metrics-info <deploy> <dataset> metrics — list metrics with {type, temporality, unit} metadata. Read this before writing the query (see Choosing a Query Shape).
  4. scripts/metrics-info <deploy> <dataset> tags [<tag> values] — explore filter dimensions.
  5. scripts/metrics-query <deploy> '<MPL>' <start> <end> — execute. Iterate.

If the user names a specific entity (service, host, …), scripts/metrics-info <deploy> <dataset> find-metrics "<value>" finds the metrics carrying it. find-metrics searches tag values, not metric names — don't use it for general discovery.

Choosing a Query Shape

The metrics-info listing returns each metric's {type, temporality, unit}. Read these before composing — never assume a metric is a simple scalar.

Field Values Drives
type Gauge, CounterMonotonic, CounterNonMonotonic, Histogram Required pre-aggregation operators.
temporality Cumulative, Delta, null Whether counter values are running totals or per-interval deltas. null is normal for Gauges.
unit UCUM string (Cel, kW.h, s, %, [ppm], …) or null Display unit; preserve when reporting results.

Rules per type (consult metrics-spec for exact operator names — they evolve):

  • Gauge — instantaneous value. Align directly with avg/min/max/sum. Don't apply a rate; you'd be averaging meaningless deltas of an instantaneous value.
  • CounterMonotonic + Cumulative — running total (resets aside). The raw values are rarely what you want. Convert to a per-second rate first, then align/aggregate.
  • CounterMonotonic + Delta — already per-interval. Sum/align without a rate step.
  • CounterNonMonotonic — can go up or down (queue depth, balance). Intent is ambiguous: rate, delta, or current value all make sense for different questions. Ask the user before picking one.
  • Histogram — not a scalar. align using avg produces nonsense. Use bucket … using with the histogram functions from metrics-spec; quantiles are float specs to those functions, and temporality selects the variant (Cumulative vs Delta interpolation). Consult metrics-spec for the exact signatures.
  • temporality: null — "not applicable for this instrument type" (the norm for Gauges), not "missing data".

When surfacing numbers, attach the unit (treat null as unitless). If you combine metrics with mismatched units in arithmetic, warn rather than silently producing a meaningless number.

Query Metrics

scripts/metrics-query [-w pixels] [--pixel-per-point n] <deploy> '<MPL>' <start> <end>
Parameter Notes
deploy Name from ~/.axiom.toml (e.g. prod).
MPL Pipeline string. Dataset is parsed from the MPL itself.
start / end RFC3339 (2025-01-01T00:00:00Z) or relative (now-1h, now).
-w / --chart-width <px> Optional. Target chart width in pixels; lets the server resolve $__interval.
--pixel-per-point <n> Optional. Pixels per point (server default 10); with -w sets the bucket count.

Always single-quote the MPL string in the shell. MPL is full of backticks; inside double quotes the shell executes them as command substitution, silently mangling the query (or running whatever the identifier names).

Bound the output before grouping. group by <tag> returns one series per tag value with no cap — on a high-cardinality tag this floods the output. Check cardinality first (describe, or tags <tag> values) and prefer plain group using <agg> while exploring.

Examples:

scripts/metrics-query prod -w 1200 \
  '`my-dataset`:`http.server.duration` | align to $__interval using avg' \
  now-1h now

scripts/metrics-query prod -w 1200 \
  '`my-dataset`:`http.server.duration`
   | wh
자주 묻는 질문

쿼리 언어를 알아야 하나요?

자세히 알 필요는 없습니다. 에이전트가 먼저 쿼리 규칙을 읽고 쿼리를 대신 작성합니다.

어떤 설정이 필요한가요?

스킬의 readme 파일에 설명된 대로 Axiom 접근 설정을 먼저 해야 합니다.

이름으로 지표를 찾을 수 있나요?

태그 값을 검색하므로, 알려진 서비스나 호스트 이름이 붙은 지표를 찾을 때 가장 적합합니다.

상세 정보

작성자의 원본 설명

Runs metrics queries against Axiom MetricsDB via scripts. Discovers available metrics, tags, and tag values. Use when asked to query metrics, explore metric datasets, check metric values, or investigate OTel metrics data.

repo: openclaw/clawhub

인기도

GitHub 스타
9.5k
순위
#12263
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬