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'