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
This commit is contained in:
parent
c21cf54847
commit
2c081eed28
12 changed files with 989 additions and 201 deletions
|
|
@ -195,6 +195,23 @@
|
|||
no_log: true
|
||||
tags: [jellyfin_metrics]
|
||||
|
||||
# Forgejo API token for metrics collection
|
||||
- name: Fetch Forgejo API token for metrics
|
||||
ansible.builtin.command:
|
||||
cmd: op read "op://vg6xf6vvfmoh5hqjjhlhbeoaie/w3663ffnvkewbftncqxtcpeavy/api-token"
|
||||
delegate_to: localhost
|
||||
register: _forgejo_metrics_api_token
|
||||
changed_when: false
|
||||
no_log: true
|
||||
check_mode: false
|
||||
tags: [forgejo_metrics]
|
||||
|
||||
- name: Set Forgejo metrics API token fact
|
||||
ansible.builtin.set_fact:
|
||||
forgejo_metrics_api_key: "{{ _forgejo_metrics_api_token.stdout }}"
|
||||
no_log: true
|
||||
tags: [forgejo_metrics]
|
||||
|
||||
roles:
|
||||
- role: alloy
|
||||
tags: alloy
|
||||
|
|
@ -218,5 +235,7 @@
|
|||
tags: jellyfin
|
||||
- role: jellyfin_metrics
|
||||
tags: jellyfin_metrics
|
||||
- role: forgejo_metrics
|
||||
tags: forgejo_metrics
|
||||
- role: caddy
|
||||
tags: caddy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue