feat: Add grafana-dashboard action #14

Merged
ahmad merged 1 commit from feat/grafana-dashboard-action into main 2026-08-16 18:02:03 +00:00
Owner

What

A shared grafana-dashboard composite action: renders an app's standard
monitoring dashboard and pushes it into that app's own Grafana folder via the
API (ensures the folder, overwrites the dashboard).

Why

App dashboards should live with each app, not centralised — but the layout
should be one standard, not N drifting copies. This action holds the single
template; each app calls it with its own params (job, folder, containers) from
its own pipeline. Same model as release@v3 / deploy-vps@v3.

Notes

  • Layout: service health (RED), API by route, Node.js runtime, Loki logs.
    Only job label + container names are substituted; Grafana ${datasource}
    and {{job}} tokens are preserved.
  • Empty grafana-token skips the push (an app without monitoring configured
    deploys unchanged).
  • Verified: renders to valid JSON, correct job/container substitution, no
    leftover placeholders, bash syntax clean.
  • On merge, move the v3 tag so consumers pinning @v3 pick it up.
### What A shared `grafana-dashboard` composite action: renders an app's standard monitoring dashboard and pushes it into that app's own Grafana folder via the API (ensures the folder, overwrites the dashboard). ### Why App dashboards should live with each app, not centralised — but the *layout* should be one standard, not N drifting copies. This action holds the single template; each app calls it with its own params (job, folder, containers) from its own pipeline. Same model as release@v3 / deploy-vps@v3. ### Notes - Layout: service health (RED), API by route, Node.js runtime, Loki logs. Only job label + container names are substituted; Grafana `${datasource}` and `{{job}}` tokens are preserved. - Empty `grafana-token` skips the push (an app without monitoring configured deploys unchanged). - Verified: renders to valid JSON, correct job/container substitution, no leftover placeholders, bash syntax clean. - On merge, move the `v3` tag so consumers pinning `@v3` pick it up.
Push an app's standard monitoring dashboard into its own Grafana folder.
The layout is defined once here and shared by every app — service health
(RED), API by route, Node.js runtime, and Loki logs — with only the job
label and container names substituted. Each app calls it from its own
pipeline, so the app owns its dashboard while the template is single-sourced.
Ensures the folder exists and overwrites the dashboard (pipeline is the
source of truth). Empty grafana-token skips the push.
ahmad merged commit 28455926ea into main 2026-08-16 18:02:03 +00:00
ahmad deleted branch feat/grafana-dashboard-action 2026-08-16 18:02:03 +00:00
Sign in to join this conversation.
No description provided.