Add Forgejo repository health metrics and Grafana dashboard #245

Merged
eblume merged 5 commits from feature/forgejo-metrics-dashboard into main 2026-02-22 11:16:04 -08:00

5 commits

Author SHA1 Message Date
9bb104c9f4 Fix timezone offset handling in epoch conversion
The jq epoch helper was discarding timezone offsets (e.g. -08:00) and
treating local time as UTC. Now parses the offset with capture() and
applies it correctly: -08:00 adds 8h, +05:30 subtracts 5h30m.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 11:12:50 -08:00
383c2360e2 Filter per-workflow metrics to workflows that exist on default branch
Queries .forgejo/workflows/ (or .github/workflows/) on the default
branch and only emits run_duration and last_success metrics for
workflows found there. Prevents stale deleted workflows from showing
ever-increasing staleness in the dashboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 11:07:14 -08:00
705016da9a Fix API endpoints and timestamp parsing for Forgejo
- Use /repos/{r}/commits (not /git/commits) — correct Forgejo API path
- Handle timezone offsets (-08:00) in jq epoch conversion
- Use Forgejo field names: workflow_id, created/stopped, duration (ns)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 11:01:49 -08:00
03e83e7201 Fix Forgejo port (3001) and add repo drill-down variable to dashboard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 10:56:28 -08:00
23f3982b95 Add Forgejo repository health metrics collector and Grafana dashboard
New forgejo_metrics Ansible role collects repo health, CI/CD, language,
and release metrics from the Forgejo API via textfile collector. Grafana
dashboard provides at-a-glance visibility into build status, staleness,
queue depth, and repository activity across all repos.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 10:52:01 -08:00