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
| Metric | Type | Meaning / alert hint |
|---|---|---|
firn_produce_total{topic} | counter | client produce rate per topic |
firn_fetch_total{topic} | counter | client fetch rate |
firn_fsync_seconds | histogram | durability-bound latency of the append path — p99 spike ⇒ disk problem |
firn_group_rebalances_total | counter | rising slope ⇒ members flapping (network? GC?) |
firn_queue_depth | gauge | unacked + redelivery pressure across queues — sustained growth ⇒ DLQ draining needed |
firn_federation_cursor_lag_seconds{peer,topic,partition} | gauge | seconds since last full import — alert > 30s means peer unreachable or import stalled |
firn_flush_window_records | histogram | records per flush window (0-row windows normal under light load) |
firn_flush_window_bytes | histogram | bytes per window — tune -flush-window/-max-batch-bytes from this |
firn_flush_window_wait_seconds | histogram | age of oldest pending frame at flush (timer + fsync) |
firn_flush_failures_total | counter | any non-zero = whole batches rolled back; produce errors returned |
firn_blocks_sealed_total{topic,partition} | counter | sealed blocks produced; flat-zero with traffic ⇒ sealing stalled |
firn_block_bytes_sealed_total{topic,partition} | counter | bytes sealed per partition |
firn_blocks_pushed_total{topic,partition,peer,result} | counter | peer push attempts; result="false" above tolerance ⇒ replica lag |
firn_blocks_committed_total{topic,partition} | counter | blocks proposed to quorum after majority push |
firn_lease_grants_total{topic,partition} | counter | grants/re-grants; rising slope ⇒ membership churn |
firn_lease_renewals_total{topic,partition} | counter | self-holder renewals; absent on a healthy cluster ⇒ stuck holder |
Alert ideas (starting points)
increase(firn_flush_failures_total[5m]) > 0→ page; storage rollback is happening.firn_federation_cursor_lag_seconds > 60(per peer/topic) → page DR owner; import is stalled.rate(firn_blocks_pushed_total{result="false"}[10m]) > 0.1sustained → replica lag; check mesh mTLS, disks, peer health.rate(firn_lease_renewals_total[5m]) == 0 and rate(firn_blocks_sealed_total[5m]) > 0on cluster → holder stuck; investigate lease TTL / quorum.- DLQ non-empty:
firn-cli dlq list --queue Q— poison messages or a broken consumer; redrive after fixing.
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.