query-metrics
Qué hace
Esta habilidad ejecuta búsquedas sobre métricas guardadas en Axiom. Está pensada para personas que siguen mediciones de sistemas o apps y quieren respuestas sin escribir cada consulta a mano.
Cuándo usarla
- ✓Cuando quieres saber qué métricas están disponibles en tus conjuntos de datos de Axiom.
- ✓Cuando necesitas el valor de una métrica en un intervalo de tiempo.
- ✓Cuando quieres encontrar qué métricas llevan el nombre de un servicio o un host concreto.
Link de la skill
https://github.com/openclaw/clawhub/blob/main/.agents/skills/query-metrics/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Enséñame la métrica de número de peticiones de mi servicio de API en el último día.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente enumera las métricas y sus etiquetas, lee las reglas de consulta y ejecuta una consulta sobre tu conjunto de datos en el intervalo de tiempo que elijas. Afina la consulta hasta que el resultado responde a tu pregunta.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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
Preguntas frecuentes
¿Necesito conocer el lenguaje de consulta?
No en detalle. El agente lee primero las reglas de consulta y escribe la consulta por ti.
¿Qué configuración necesita?
Primero hay que configurar los ajustes de acceso a Axiom, como se describe en el readme de la habilidad.
¿Puede encontrar métricas por nombre?
Busca por valores de etiquetas, así que es mejor para encontrar métricas que llevan el nombre de un servicio o host conocido.
Detalles
Descripción original del autor
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
Popularidad
- Estrellas en GitHub
- 9,5 mil
- Posición en el ranking
- #12263
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
axiom-alerting
9,5 milAyuda a tu agente a crear y gestionar monitores de Axiom y rutas de notificación mediante la API de Axiom, y a comprobar que las alertas se comportan como se espera.
axiom-sre
9,5 milAyuda a tu agente a investigar incidencias y errores de producción paso a paso, comprobando cada hipótesis con los registros de Axiom antes de sacar una conclusión.
building-dashboards
9,5 milAyuda a tu agente a diseñar paneles de Axiom con gráficos, consultas y filtros adecuados, partiendo de las decisiones que el panel debe respaldar.
controlling-costs
9,5 milAyuda a tu agente a encontrar datos sin uso en Axiom y a construir paneles y monitores que sigan y reduzcan el coste de los registros.
Skills parecidas
gitcrawl
394 milPermite que tu agente busque en un archivo guardado de incidencias y pull requests de GitHub, agrupe duplicados y revise su estado actual en GitHub.
slacrawl
394 milPermite que tu agente busque y cuente mensajes en un archivo local de Slack, revise qué tan reciente es y lo actualice cuando haga falta.
goplaces
394 milAyuda a tu agente a buscar lugares, obtener sus detalles y reseñas, y resolver nombres de lugares usando Google Places, con salida JSON para scripts.