Metrics & SRE

Prometheus text exposition on :9460/metrics (viewer key by default). Counters are per-process; replication work shows up as rate-of-change on sealed/pushed/committed series.

Catalog

MetricTypeMeaning / alert hint
firn_produce_total{topic}counterclient produce rate per topic
firn_fetch_total{topic}counterclient fetch rate
firn_fsync_secondshistogramdurability-bound latency of the append path — p99 spike ⇒ disk problem
firn_group_rebalances_totalcounterrising slope ⇒ members flapping (network? GC?)
firn_queue_depthgaugeunacked + redelivery pressure across queues — sustained growth ⇒ DLQ draining needed
firn_federation_cursor_lag_seconds{peer,topic,partition}gaugeseconds since last full import — alert > 30s means peer unreachable or import stalled
firn_flush_window_recordshistogramrecords per flush window (0-row windows normal under light load)
firn_flush_window_byteshistogrambytes per window — tune -flush-window/-max-batch-bytes from this
firn_flush_window_wait_secondshistogramage of oldest pending frame at flush (timer + fsync)
firn_flush_failures_totalcounterany non-zero = whole batches rolled back; produce errors returned
firn_blocks_sealed_total{topic,partition}countersealed blocks produced; flat-zero with traffic ⇒ sealing stalled
firn_block_bytes_sealed_total{topic,partition}counterbytes sealed per partition
firn_blocks_pushed_total{topic,partition,peer,result}counterpeer push attempts; result="false" above tolerance ⇒ replica lag
firn_blocks_committed_total{topic,partition}counterblocks proposed to quorum after majority push
firn_lease_grants_total{topic,partition}countergrants/re-grants; rising slope ⇒ membership churn
firn_lease_renewals_total{topic,partition}counterself-holder renewals; absent on a healthy cluster ⇒ stuck holder

Alert ideas (starting points)

Scrape & dashboards

# Prometheus scrape (viewer key in basic-auth-ish header)
curl -H "Authorization: Bearer $VIEWER_KEY" localhost:9460/metrics

# Grafana: PromQL dashboards over the counters above; starter dashboards are not
# shipped — build from the catalog, panels per plane: produce, durability (fsync),
# cluster (seal/push/commit/lease), consumption (rebalances/depth/lag)

Full operator playbooks (restore drills, DLQ triage, federation cutover) live in the repo: docs/sre.md, docs/federation-cutover.md.