Skip to content

feat(grafana): add fleet health dashboard - #165

Open
mislayming wants to merge 2 commits into
ongridio:mainfrom
mislayming:codex/fleet-health-dashboard
Open

mislayming wants to merge 2 commits into
ongridio:mainfrom
mislayming:codex/fleet-health-dashboard

Conversation

@mislayming

@mislayming mislayming commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a provisioned and embedded Ongrid Fleet Health (Troubleshooting) Grafana dashboard
  • cover device offline counts, top last_seen age, edge connections, scrape failures, manager runtime pressure, Prometheus series cardinality, prom remote_write calls, and alert evaluator ticks
  • keep the dashboard portable by using only generic ongrid/Prometheus metrics and no environment-specific hostnames, URLs, or screenshots

Dependency

Tests

  • jq empty internal/manager/biz/grafana/dashboards/fleet-health.json deploy/install/grafana/provisioning/dashboards/json/fleet-health.json deploy/grafana/provisioning/dashboards/json/fleet-health.json
  • go test ./internal/manager/biz/grafana ./internal/pkg/grafana

Author confirmation

  • I have read and agree to the project contribution guide in CONTRIBUTING.md.

@mislayming
mislayming marked this pull request as ready for review July 7, 2026 11:21
@mislayming
mislayming requested a review from singchia as a code owner July 7, 2026 11:21
@singchia

Copy link
Copy Markdown
Member

#165 这个方向可以。新增一个独立的 Ongrid Fleet Health Grafana dashboard 没问题,它和现有 ongrid-monitor 不是替代关系:

  • ongrid-monitor:跟 Ongrid Monitor 页保持一致,主要看主机资源趋势和用户自定义面板;
  • fleet-health:偏排障入口,集中看设备离线、last_seen age、edge connection、scrape failure、remote_write、alert evaluator、manager/Prometheus 压力。

这样作为 troubleshooting dashboard 是有价值的。

但这个 PR 现在不能直接进,因为它同时带了 #164 的内容。请先等 #164 合并后 rebase,或者重新拆一个干净分支,只保留 dashboard 相关文件:

  • deploy/grafana/provisioning/dashboards/json/fleet-health.json
  • deploy/install/grafana/provisioning/dashboards/json/fleet-health.json
  • internal/manager/biz/grafana/dashboards/fleet-health.json

其它 alert pipeline、device offline metric、migration、rule preset 变更应该都属于 #164,不要混在这个 PR 里。

如果要把体验再做完整一点,后续可以单独加一个入口:Monitor 页继续打开 ongrid-monitor,旁边再给一个 Fleet Health / troubleshooting 链接打开 ongrid-fleet-health。这个可以另开 PR,不阻塞本 PR。

@singchia

Copy link
Copy Markdown
Member

Reviewed. I would not merge this PR in its current form.

The Grafana fleet dashboard itself looks fine as an additive panel, but this branch also includes the alert/device-offline changes from #164. Please split or rebase this PR so it contains only the dashboard files. We should decide/fix #164 separately before taking these dashboard changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants