blumeops/ansible/roles/forgejo_metrics/defaults/main.yml
Erich Blume 2c081eed28 Add Forgejo repository health metrics and Grafana dashboard (#245)
## Summary
- New `forgejo_metrics` Ansible role that queries the Forgejo REST API every 60s and writes Prometheus textfile metrics (open PRs, issues, languages, releases, commits, Actions runs/duration/success)
- Grafana dashboard "Forgejo Repository Health" with 12 panels across 4 rows: overview stats, CI/CD health, repository info, and staleness tracking
- Deletes superseded `forgejo-actions-dashboard` plan doc (this implementation covers a broader scope)

## Deployment and Testing
- [ ] `mise run provision-indri -- --tags forgejo_metrics` to deploy the collector
- [ ] `ssh indri 'cat /opt/homebrew/var/node_exporter/textfile/forgejo.prom'` to verify metrics
- [ ] `argocd app sync grafana-config` to deploy the dashboard
- [ ] Check Grafana dashboard "Forgejo Repository Health" loads with data
- [ ] `mise run services-check` passes

Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/245
2026-02-22 11:16:03 -08:00

20 lines
630 B
YAML

---
# Forgejo metrics collection configuration
# Forgejo server URL
forgejo_metrics_url: "http://localhost:3001"
# Path to file containing Forgejo API token (should have 600 permissions)
forgejo_metrics_api_key_file: "/Users/erichblume/.forgejo-api-key"
# Metrics collection interval in seconds
forgejo_metrics_interval: 60
# Output directory for prometheus textfile collector
forgejo_metrics_dir: /opt/homebrew/var/node_exporter/textfile
# Script installation path
forgejo_metrics_script: /Users/erichblume/.local/bin/forgejo-metrics
# Log directory for metrics script output
forgejo_metrics_log_dir: /opt/homebrew/var/log