building-dashboards
它能做什么
这个技能会在 Axiom(一个日志和监控工具)中构建仪表盘,用图表回答具体问题。适合需要清晰仪表盘的工程师和分析师,包括从 Splunk 或 Grafana 迁移过来的仪表盘。
适用场景
- ✓当你想为某个团队或服务构建新仪表盘时。
- ✓当你要把仪表盘从 Splunk 或 Grafana 迁移到 Axiom 时。
- ✓当你需要为仪表盘面板选择图表类型并设置选项时。
技能链接
https://github.com/openclaw/clawhub/blob/main/.agents/skills/building-dashboards/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我们的结账服务构建一个 Axiom 仪表盘,显示错误率和慢请求。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能会先询问仪表盘是给谁用的,以及它要支持哪些决策。然后检查 Axiom 中的数据字段,为每个问题选择合适的图表,并通过 API 构建仪表盘。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Building Dashboards
Philosophy
- Decisions first. Every panel answers a question that leads to an action.
- Overview → drilldown → evidence. Start broad, narrow on click/filter, end with raw logs.
- Rates and percentiles over averages. Averages hide problems; p95/p99 expose them.
- Simple beats dense. One question per panel. No chart junk.
- Validate with data. Never guess fields—discover schema first.
- Compute what's asked, or defer. If a panel can't be computed, replace it with a
Notedocumenting the blocker. Never substitute a different quantity, even disclosed. See Compute or Defer.
Entry Points
| Starting from | Workflow |
|---|---|
| Vague description | Intake → check dataset kind → design blueprint (APL or MPL) → queries per panel → deploy |
| Template | Pick template → customize dataset/service/env → deploy |
| Splunk dashboard | Extract SPL → translate via spl-to-apl → map to chart types → deploy |
| Grafana dashboard | Project canonical panel spec (expr, legendFormat, unit, title, description) → translate PromQL → map chart types → deploy. See reference/grafana-migration.md. |
| Exploration | Use axiom-sre to discover schema/signals → productize into panels |
Intake: What to Ask First
Audience & decision
- Oncall triage? (fast refresh, error-focused)
- Team health? (daily trends, SLO tracking)
- Exec reporting? (weekly summaries, high-level)
Scope
- Service, environment, region, cluster, endpoint?
- Single service or cross-service view?
Dataset kind. Run
scripts/metrics/datasets <deploy>and checkkind.otel:metrics:v1→ metrics dataset, follow the Metrics path.- anything else → events/logs dataset, follow the APL path.
Never run
getschemaon a metrics dataset. It returns 0 rows without error.APL path: discover fields with
['dataset'] | where _time between (ago(1h) .. now()) | getschema. Continue to steps 4–5.Metrics path:
scripts/metrics/metrics-spec <deploy> <dataset>— required before any MPL query.scripts/metrics/metrics-info <deploy> <dataset> metrics | tags | tags <tag> valuesfor discovery.- If discovery is empty, retry with
--start7 days ago (sparse metrics). find-metrics <value>searches tag values, not metric names — use it only with a known entity name.- Skip to the Metrics/MPL Blueprint.
Golden signals (APL path)
- Traffic: requests/sec, events/min
- Errors: error rate, 5xx count
- Latency: p50, p95, p99 duration
- Saturation: CPU, memory, queue depth, connections
Drilldown dimensions (APL path)
- What do users filter/group by? (service, route, status, pod, customer_id)
Dashboard Blueprint
Pick the blueprint matching the dataset kind.
APL Blueprint (events/logs datasets)
1. At-a-Glance (Statistic panels)
Single numbers that answer "is it broken right now?"
- Error rate (last 5m)
- p95 latency (last 5m)
- Request rate (last 5m)
- Active alerts (if applicable)
2. Trends (TimeSeries panels)
Time-based patterns that answer "what changed?"
- Traffic over time
- Error rate over time
- Latency percentiles over time
- Stacked by status/service for comparison
3. Breakdowns (Table/Pie panels)
Top-N analysis that answers "where should I look?"
- Top 10 failing routes
- Top 10 error messages
- Worst pods by error rate
- Request distribution by status
4. Evidence (LogStream + SmartFilter)
Raw events that answer "what exactly happened?"
- LogStream filtered to errors
- SmartFilter for service/env/route
- Key fields projected for readability
Metrics/MPL Blueprint (metrics datasets)
Use align to $__interval using … for bucketing — $__interval is supplied by the dashboard runtime. Hard-coded windows over- or under-resolve. Validate every pipeline with scripts/metrics/mpl-validate-chart; both it and chart-add --mpl reject inline time ranges ([1h..]).
Exception: for sparse metrics where $__interval rounds to empty buckets, a fixed wider window (e.g. 1h) is acceptable; document why on the chart.
1. At-a-Glance (Statistic panels)
Current values — "what's the state right now?"
- Use
group using avg(gauges) orgroup using last(counters). - Read the metric's
unitviametrics-info … metrics <m> infoand pass it to `chart-a
常见问题
它能转换 Splunk 或 Grafana 的仪表盘吗?
能。它有步骤可以把 Splunk 搜索和 Grafana 面板转换为 Axiom 查询。
为什么它更推荐百分位数而不是平均值?
平均值可能掩盖问题,而 p95、p99 等百分位数能显示慢的异常值。
如果某个面板无法计算会怎样?
它会用一条说明阻碍原因的注释替换该面板,而不是显示一个不同的数字。
详情
作者的原始描述
Designs and builds Axiom dashboards via API. Covers chart types, APL and metrics/MPL query patterns, SmartFilters, layout, and configuration options. Use when creating dashboards, migrating from Splunk, or configuring chart options.
repo: openclaw/clawhub
热度
- GitHub 星标
- 9.5k
- 排名
- #12228
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
axiom-alerting
9.5k帮你的智能体通过 Axiom API 创建和管理监控器与通知路由,并检查告警是否按预期运行。
axiom-sre
9.5k帮你的智能体逐步调查生产事故和缺陷,在得出结论之前,用 Axiom 日志验证每一个猜测。
controlling-costs
9.5k帮你的智能体在 Axiom 中找出未被使用的数据,并构建用于追踪和削减日志成本的仪表盘与监控器。
convex-acquire-domain
9.5k帮你的智能体为 Convex 应用查找并购买域名,再将其连接到你的应用。只有在你选定名称并同意后才会操作。