query-metrics
Fungsinya
Skill ini menjalankan pencarian pada metrik yang tersimpan di Axiom. Skill ini ditujukan untuk orang yang melacak pengukuran sistem atau aplikasi dan ingin jawaban tanpa menulis setiap kueri secara manual.
Kapan dipakai
- βSaat Anda ingin mengetahui metrik apa saja yang tersedia di dataset Axiom Anda.
- βSaat Anda membutuhkan nilai sebuah metrik dalam rentang waktu tertentu.
- βSaat Anda ingin mencari metrik yang memuat nama layanan atau host tertentu.
Link skill
https://github.com/openclaw/clawhub/blob/main/.agents/skills/query-metrics/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βTampilkan metrik jumlah permintaan untuk layanan API saya selama sehari terakhir.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mendaftar metrik beserta tag-tagnya, membaca aturan kueri, lalu menjalankan kueri pada dataset Anda untuk rentang waktu yang Anda pilih. Agent memperbaiki kueri sampai hasilnya menjawab pertanyaan Anda.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
scripts/datasets <deploy> --kind otel:metrics:v1β list metrics datasets.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.scripts/metrics-info <deploy> <dataset> metricsβ list metrics with{type, temporality, unit}metadata. Read this before writing the query (see Choosing a Query Shape).scripts/metrics-info <deploy> <dataset> tags [<tag> values]β explore filter dimensions.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 avgproduces nonsense. Usebucket β¦ usingwith the histogram functions frommetrics-spec; quantiles are float specs to those functions, andtemporalityselects the variant (CumulativevsDeltainterpolation). Consultmetrics-specfor 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
Pertanyaan umum
Apakah saya perlu tahu bahasa kueri?
Tidak secara mendalam. Agent membaca aturan kueri lebih dulu dan menulis kuerinya untuk Anda.
Pengaturan apa yang dibutuhkan?
Pengaturan akses Axiom Anda harus sudah dikonfigurasi lebih dulu, seperti yang dijelaskan di readme skill.
Apakah metrik bisa dicari berdasarkan nama?
Skill ini mencari nilai tag, jadi paling cocok untuk mencari metrik yang memuat nama layanan atau host yang sudah diketahui.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 9.5k
- Peringkat
- #12263
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
axiom-alerting
9.5kMembantu agen Anda membuat dan mengelola monitor Axiom serta rute notifikasi melalui API Axiom, dan memeriksa apakah peringatan berperilaku sesuai harapan.
axiom-sre
9.5kMembantu agen Anda menyelidiki insiden dan bug produksi langkah demi langkah, menguji setiap dugaan terhadap log Axiom sebelum menarik kesimpulan.
building-dashboards
9.5kMembantu agen Anda mendesain dasbor Axiom dengan grafik, kueri, dan filter yang sesuai, dimulai dari keputusan yang harus didukung dasbor tersebut.
controlling-costs
9.5kMembantu agen Anda menemukan data yang tidak terpakai di Axiom dan membangun dasbor serta monitor yang melacak dan memangkas biaya logging.
Skill serupa
gitcrawl
394kMemungkinkan agent Anda mencari arsip issue dan pull request GitHub yang tersimpan, mengelompokkan yang duplikat, dan memeriksa status terkininya di GitHub.
slacrawl
394kMemungkinkan agent Anda mencari dan menghitung pesan di arsip Slack lokal, memeriksa seberapa baru arsip itu, dan menyegarkannya bila diperlukan.
goplaces
394kMembantu agent Anda mencari tempat, mendapatkan detail dan ulasannya, serta menentukan nama tempat memakai Google Places, dengan keluaran JSON untuk skrip.