Skip to content

observability: rule-25 alerts/tile/catalog for pool-reaper metrics (#44 follow-up)#52

Merged
mastermanas805 merged 1 commit into
masterfrom
observability/pool-reaper-rule25-44
Jun 4, 2026
Merged

observability: rule-25 alerts/tile/catalog for pool-reaper metrics (#44 follow-up)#52
mastermanas805 merged 1 commit into
masterfrom
observability/pool-reaper-rule25-44

Conversation

@mastermanas805

Copy link
Copy Markdown
Member

Rule-25 monitoring follow-up for the two hot-pool reaper metrics added by provisioner PR #44 (sweep #8) in provisioner/internal/pool/metrics.go. Each metric ships its full rule-25 set in this one PR: Prom rule + NR alert JSON + dashboard tile + METRICS-CATALOG row.

instant_pool_reap_total{resource_type, status, outcome} — CounterVec

Reaper actions on status="failed" pool_items; outcome ∈ {reaped, deprovision_err, delete_err}.

  • Prom rule PoolReapErrors (new group instant-provisioner-pool-reaper): rate(...{outcome=~"deprovision_err|delete_err"}[15m]) by (resource_type,outcome) > 0 for 30m, P2 warning (reaper wedged → 'failed' pool infra accumulating).
  • NR alert newrelic/alerts/pool-reap-errors.json (NRQL sum over the error outcomes, FACET resource_type/outcome, WARNING > 0 / 30m).
  • Dashboard tile "Pool reaper — actions by status/outcome (24h)".
  • METRICS-CATALOG.md row.

instant_pool_stuck_assigned{resource_type} — GaugeVec

pool_items stuck assigned past the 30m grace. Operator signal — deliberately NOT auto-reaped (provisioner can't distinguish a crashed-claim orphan from a live api binding; truehomie-db DROP incident class).

  • Prom rule PoolStuckAssigned (same group): max(...) by (resource_type) > 0 for 1h, P2 operator-action warning (leaked shared infra → manual resources-table anti-join).
  • NR alert newrelic/alerts/pool-stuck-assigned.json (NRQL latest, FACET resource_type, WARNING > 0 / 1h, LAST_VALUE fill).
  • Dashboard tile "Pool items stuck 'assigned' past 30m — leaked shared infra (must be 0)".
  • METRICS-CATALOG.md row.

Notes / deviations from brief

  • The brief suggested outcome="error" for the reap alert; the actual code emits deprovision_err and delete_err, so the rule/alert match those real label values.
  • Both alerts are WARNING (P2) per rule 25 (observability/recoverable, not data-loss).

Validation

  • Both new alert JSONs and the dashboard JSON parse with json.load.
  • k8s/prometheus-rules.yaml parses as YAML; new group exposes PoolReapErrors + PoolStuckAssigned.
  • METRICS-CATALOG table rows keep the 7-column shape.
  • Dashboard edited surgically (compact one-line layout style preserved); 40 → 42 widgets.

🤖 Generated with Claude Code

… follow-up)

Provisioner PR #44 (sweep #8) added two hot-pool reaper metrics in
provisioner/internal/pool/metrics.go. Ship their rule-25 monitoring:

instant_pool_reap_total{resource_type,status,outcome} (CounterVec)
  - Prom rule PoolReapErrors (instant-provisioner-pool-reaper group):
    rate of outcome=deprovision_err|delete_err > 0 for 30m, P2 warning.
  - NR alert newrelic/alerts/pool-reap-errors.json.
  - Dashboard tile "Pool reaper — actions by status/outcome (24h)".
  - METRICS-CATALOG.md row.

instant_pool_stuck_assigned{resource_type} (GaugeVec)
  - Prom rule PoolStuckAssigned (same group):
    max by (resource_type) > 0 for 1h, P2 operator-action warning
    (NOT auto-reaped — leaked shared infra needs manual anti-join).
  - NR alert newrelic/alerts/pool-stuck-assigned.json.
  - Dashboard tile "Pool items stuck 'assigned' past 30m — leaked shared infra (must be 0)".
  - METRICS-CATALOG.md row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mastermanas805 mastermanas805 enabled auto-merge (squash) June 4, 2026 15:40
@mastermanas805 mastermanas805 merged commit c7e9c47 into master Jun 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant