Files
ghtracker/deploy/kubernetes/prometheusrule.yaml
T
lukaszraczylo 5313b56774 feat: add GitHub repository dashboard with Prometheus metrics
ghtracker authenticates as a GitHub App and scans a configured list of repositories on a schedule. It serves a dashboard, a JSON state endpoint, a health probe and Prometheus metrics.

The dashboard lists only items that need attention: failing workflows, pull requests that wait too long or fail their checks, stale issues and projects that failed to scan. It has search, dynamic filters and a button that rescans on demand. The Vue app is embedded in the Go binary.

The client protects the GitHub rate limit with conditional requests, a request reserve and Retry-After handling.
2026-10-02 04:28:52 +01:00

36 lines
1.3 KiB
YAML

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: ghtracker
spec:
groups:
- name: ghtracker
rules:
- alert: GhtrackerWorkflowFailing
expr: ghtracker_workflow_failing == 1
for: 10m
labels: { severity: warning }
annotations:
summary: 'Workflow {{ $labels.workflow }} failing in {{ $labels.repo }}'
- alert: GhtrackerPullRequestWaiting
expr: ghtracker_pr_age_seconds > 3 * 86400
labels: { severity: warning }
annotations:
summary: 'PR #{{ $labels.number }} in {{ $labels.repo }} waiting over 3 days'
- alert: GhtrackerRepoDown
expr: ghtracker_repo_up == 0
for: 30m
labels: { severity: warning }
annotations:
summary: 'ghtracker cannot refresh {{ $labels.repo }}'
- alert: GhtrackerDataStale
expr: time() - ghtracker_last_refresh_timestamp_seconds > 13 * 3600
labels: { severity: warning }
annotations:
summary: 'ghtracker has not refreshed for over 13 hours'
- alert: GhtrackerRateLimitLow
expr: ghtracker_github_rate_limit_remaining < 500
labels: { severity: warning }
annotations:
summary: 'GitHub rate limit budget below 500'