Observability #
There are three ways to see what a node is doing: the HTTP endpoints, the INFO command, and pprof.
All three are opt-in.
HTTP endpoints #
./bin/IceFireDB --metrics --metrics-addr 127.0.0.1:11002 -d /var/lib/icefiredb
| Path | Response | Use |
|---|---|---|
/healthz | 200 ok whenever the process is up | Liveness probe |
/readyz | 200 ready once the storage backend has initialized; 503 not ready before that | Readiness probe / rollout gate |
/metrics | Prometheus text exposition | Scraping |
The server is a plain http.Server with a 5-second ReadHeaderTimeout; it has no authentication, so
keep it on loopback or a private interface (see
Security).
Metrics exposed #
The registry is not the global one — it registers exactly:
| Metric | Type | Meaning |
|---|---|---|
icefiredb_connected_clients | gauge | RESP connections currently open |
go_* | collector | Go runtime (goroutines, GC, memstats, …) |
process_* | collector | Process CPU, RSS, FDs, start time |
There are no Raft metrics, no per-command counters and no latency histograms. Command and storage
counters live in INFO instead (below). Scrape interval and alerting should lean on up,
icefiredb_connected_clients and container-level signals.
# prometheus.yml
scrape_configs:
- job_name: icefiredb
static_configs:
- targets: ["127.0.0.1:11002"]
INFO
#
INFO takes no arguments — INFO memory is an argument error, unlike Redis. It answers one bulk
string with five sections, then one section per backend that registers extra metrics.
# Server
os:linux
arch:amd64
process_id:1
addr:127.0.0.1:11001
http_addr:
readonly:false
goroutine_num:38
gomaxprocs:8
thread_num:12
cgo_call_num:0
resp_client_num:1
ledisdb_version:...
# Store
name:goleveldb
get:0
get_missing:0
put:0
delete:0
get_total_time:0s
iter:0
iter_seek:0
iter_close:0
batch_commit:0
batch_commit_total_time:0s
# Mem
mem_alloc:... mem_sys:... mem_heap_alloc:... mem_head_objects:...
# GC
gc_last_time:... gc_num:... gc_pause_total:... gc_pause_history:...
| Section | Fields | Notes |
|---|---|---|
Server | os, arch, process_id, addr, http_addr, readonly, goroutine_num, gomaxprocs, thread_num, cgo_call_num, resp_client_num, ledisdb_version | addr is the configured bind address; readonly comes from the ledis config and is always false here |
Store | name, get, get_missing, put, delete, get_total_time, iter, iter_seek, iter_close, batch_commit, batch_commit_total_time | Counters are per-process, reset on restart |
Mem | mem_alloc, mem_sys, mem_looksups, mem_mallocs, mem_frees, mem_total, mem_heap_alloc, mem_heap_sys, mem_head_idle, mem_head_inuse, mem_head_released, mem_head_objects | Human-readable sizes (1.234G) |
GC | gc_last_time, gc_num, gc_pause_total, gc_pause_history | Last five pauses |
| Driver sections | see below | Only for backends that implement Metrics() |
Driver sections appended by main.go:
hybriddb:read_operations,write_operations,delete_operations,bytes_read,bytes_written,errors,uptime,closed.ipfs,ipfs-synckv,oss: ahybriddb cachesection (the title is a copy-paste in the drivers) with Ristretto counters —used_cost,cost_added,cost_evicted,hits,misses,ratio,keys_added,keys_evicted,keys_updated,gets_kept,gets_dropped,sets_dropped,sets_rejected.
INFO is a read command: it is served by the node you ask, never replicated, and a follower
answers locally.
pprof #
./bin/IceFireDB --pprof --pprof-addr 127.0.0.1:26063 -d /var/lib/icefiredb
go tool pprof http://127.0.0.1:26063/debug/pprof/heap
Standard net/http/pprof handlers: /debug/pprof/{profile,heap,goroutine,block,mutex,trace}. Same
caveat as /metrics — no auth, loopback by default.
Cluster state #
Cluster and Raft state are exposed as commands rather than metrics:
redis-cli -p 11001 RAFT LEADER # advertise address of the current leader
redis-cli -p 11001 RAFT INFO # raft state/term/index snapshot
redis-cli -p 11001 RAFT SERVER LIST # id, address, leader flag per member
redis-cli -p 11001 CLUSTER INFO # cluster_state:ok/fail, cluster_known_nodes, cluster_size
redis-cli -p 11001 CLUSTER NODES # redis-cluster-shaped node lines
redis-cli -p 11001 MACHINE # now / uptime / boottime from the Raft clock
MACHINE HUMAN returns the same values as RFC3339 timestamps and a Go duration. See
System commands.
What to alert on #
| Signal | Where | Meaning |
|---|---|---|
/readyz non-200 | HTTP probe | Storage did not initialize — the node must not take traffic |
up{job="icefiredb"} | Prometheus | The node or its metrics endpoint is gone |
-CLUSTERDOWN, -MOVED storms | Your client metrics | Write path cannot find a leader; check quorum |
resp_client_num growth | INFO Server | Connection leak in the client pool |
get_missing / put ratio | INFO Store | Read misses dominating — cache hit-rate or dataset problem |
gc_pause_total slope | INFO GC | Allocation pressure, usually large replies or big pipelines |