meshmonitor
Use this skill for MeshMonitor API work.
What this skill assumes
- - MeshMonitor exposes its REST API at INLINECODE0
- API auth uses a Bearer token
- Swagger docs are usually available at INLINECODE1
- The installer/user will provide the base URL and token at runtime
First move
- 1. Confirm the MeshMonitor base URL.
- Confirm you have a valid API token.
- Test auth with a lightweight request before doing anything bigger.
Use the helper script:
CODEBLOCK0
If auth fails, stop and ask for a fresh token. Do not guess token format.
Supported API areas
This skill is designed to use as much of the API as practical. Prefer these endpoint groups when available:
- -
info → API/version metadata - INLINECODE3 → list nodes, inspect node, position history
- INLINECODE4 → channel configuration
- INLINECODE5 → telemetry history and summaries
- INLINECODE6 → mesh messages/history
- INLINECODE7 → route/path history
- INLINECODE8 → network-wide statistics/topology summaries
- INLINECODE9 → raw packet logs
- INLINECODE10 → forecast/solar views when enabled
Workflow
1) Validate docs + auth
- - Read the live OpenAPI/Swagger if available.
- Run a single authenticated request.
- If docs and live behavior disagree, trust live behavior and note the mismatch.
2) Prefer read-heavy discovery first
Before building reports or automation:
- - inspect API info
- list nodes
- inspect one known node
- sample messages/telemetry/network endpoints
This tells you which features are populated on the actual instance.
3) Produce structured outputs
When the user asks for a report, return concise structured sections such as:
- - active nodes
- stale/offline nodes
- recent traffic
- telemetry anomalies
- route findings
- network health
4) Be careful with time filters
Many MeshMonitor endpoints are history-oriented. Prefer explicit params like:
- - INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
- INLINECODE15
When unsure, start with conservative limits.
Files in this skill
- -
references/api-notes.md → known API groups and verified live behavior notes - INLINECODE17 → helper CLI for authenticated calls, endpoint discovery, message sending, and report generation
Read references/api-notes.md when you need a quick endpoint map.
Helper CLI coverage
The helper now has first-class commands for:
- - INLINECODE19
- INLINECODE20
- INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
- INLINECODE25
- INLINECODE26
- INLINECODE27
- INLINECODE28
- INLINECODE29
- INLINECODE30
- INLINECODE31
- INLINECODE32
- INLINECODE33
- INLINECODE34
- INLINECODE35
- INLINECODE36
- INLINECODE37
- INLINECODE38
- INLINECODE39
- INLINECODE40
- INLINECODE41
- INLINECODE42
- INLINECODE43
- INLINECODE44
Recommended usage patterns
Quick health check
CODEBLOCK1
Inspect a node
CODEBLOCK2
Browse mesh traffic
CODEBLOCK3
Inspect topology
CODEBLOCK4
Send a message
CODEBLOCK5
Explore live API surface
CODEBLOCK6
Troubleshooting
Unauthorized / invalid token
- - MeshMonitor tokens are per-user and can be revoked by regeneration.
- Test with the exact bearer token the user provides.
- If the token fails, ask for a fresh token from MeshMonitor user settings.
Docs page works but API fails
- - The docs page is usually public/static.
- The API still requires Bearer auth.
- Verify the
Authorization: Bearer ... header is present.
Endpoint exists in docs but returns empty data
That usually means the instance has the feature but no stored data yet. Report that clearly instead of treating it as a hard failure.
Deliverables this skill is good at
- - mesh health summaries
- node inventories
- message/telemetry digests
- troubleshooting whether MQTT / routing / node visibility is working
- reusable scripts or automations that call MeshMonitor cleanly
meshmonitor
使用此技能进行 MeshMonitor API 工作。
本技能的假设条件
- - MeshMonitor 在 /api/v1 暴露其 REST API
- API 认证使用 Bearer 令牌
- Swagger 文档通常可在 /api/v1/docs/ 获取
- 安装者/用户将在运行时提供基础 URL 和令牌
第一步
- 1. 确认 MeshMonitor 基础 URL。
- 确认你拥有有效的 API 令牌。
- 在执行任何更大操作前,先用一个轻量级请求测试认证。
使用辅助脚本:
bash
python3 scripts/meshmonitorapi.py --base-url http://HOST:PORT --token mmv1_... info
如果认证失败,停止并请求新的令牌。不要猜测令牌格式。
支持的 API 区域
本技能旨在尽可能多地使用 API。优先使用以下端点组(如有):
- - info → API/版本元数据
- nodes → 列出节点、检查节点、位置历史
- channels → 频道配置
- telemetry → 遥测历史与摘要
- messages → 网格消息/历史
- traceroutes → 路由/路径历史
- network → 全网统计/拓扑摘要
- packets → 原始数据包日志
- solar → 启用时的预测/太阳能视图
工作流程
1) 验证文档 + 认证
- - 如可用,读取实时 OpenAPI/Swagger。
- 执行一次经过认证的请求。
- 如果文档与实时行为不一致,以实时行为为准并记录差异。
2) 优先进行只读探索
在生成报告或自动化之前:
- - 检查 API 信息
- 列出节点
- 检查一个已知节点
- 采样消息/遥测/网络端点
这能告诉你实际实例上哪些功能有数据填充。
3) 生成结构化输出
当用户请求报告时,返回简洁的结构化部分,例如:
- - 活跃节点
- 过期/离线节点
- 近期流量
- 遥测异常
- 路由发现
- 网络健康
4) 谨慎使用时间过滤器
许多 MeshMonitor 端点是面向历史的。优先使用显式参数,如:
- - since
- before
- limit
- active
- sinceDays
不确定时,从保守的限制开始。
本技能包含的文件
- - references/api-notes.md → 已知 API 组和已验证的实时行为记录
- scripts/meshmonitor_api.py → 用于认证调用、端点发现、消息发送和报告生成的辅助 CLI
当你需要快速端点映射时,请阅读 references/api-notes.md。
辅助 CLI 覆盖范围
辅助工具现在为以下命令提供了一流支持:
- - info
- nodes
- node
- position-history
- channels
- channel
- telemetry
- telemetry-count
- telemetry-node
- messages
- message
- send-message
- traceroutes
- traceroute
- network
- topology
- packets
- packet
- solar
- solar-range
- docs
- raw
- health-summary
- node-report
- traffic-report
- topology-report
推荐使用模式
快速健康检查
bash
python3 scripts/meshmonitor_api.py --base-url http://HOST:PORT --token TOKEN health-summary
检查节点
bash
python3 scripts/meshmonitor_api.py --base-url http://HOST:PORT --token TOKEN node-report !a1b2c3d4
浏览网格流量
bash
python3 scripts/meshmonitor_api.py --base-url http://HOST:PORT --token TOKEN traffic-report --limit 20
检查拓扑
bash
python3 scripts/meshmonitor_api.py --base-url http://HOST:PORT --token TOKEN topology-report
发送消息
bash
python3 scripts/meshmonitor_api.py --base-url http://HOST:PORT --token TOKEN send-message --channel 0 hello from the API
探索实时 API 表面
bash
python3 scripts/meshmonitor_api.py --base-url http://HOST:PORT --token TOKEN docs
故障排除
未授权 / 无效令牌
- - MeshMonitor 令牌是每个用户独有的,可以通过重新生成来撤销。
- 使用用户提供的精确 Bearer 令牌进行测试。
- 如果令牌失败,请从 MeshMonitor 用户设置中请求新的令牌。
文档页面正常但 API 失败
- - 文档页面通常是公开/静态的。
- API 仍然需要 Bearer 认证。
- 验证 Authorization: Bearer ... 头部是否存在。
端点存在于文档中但返回空数据
这通常意味着实例具有该功能但尚未存储数据。请清晰报告这一点,而不是将其视为硬性失败。
本技能擅长的交付物
- - 网格健康摘要
- 节点清单
- 消息/遥测摘要
- 排查 MQTT / 路由 / 节点可见性是否正常工作
- 可重用脚本或自动化,干净地调用 MeshMonitor