Metric semantics and coverage
Check metric types, units, observation boundaries and update cadence.
Skeg 0.8 · Development documentation
This reference describes the built-in metric families used in the operating manual. Follow monitoring to enable the HTTP exporter, configure collection and investigate a signal.
Scope and response format
/metrics returns Prometheus text with type declarations and samples. It reads
process-local telemetry; it is not a distributed view or an application audit
log. Scrape labels such as job and instance are supplied by your monitoring
setup, not by a tenant-scoping mechanism in Skeg.
SKEG.STATS returns a text bulk containing a cache summary, process-cost lines
and the shared telemetry dump. It is not a JSON object, and the whole reply is
not a drop-in HTTP scrape response. Access to store-wide statistics can require
operator privileges; a non-admin client should handle a refusal rather than
retry anonymously.
Counters are cumulative for the life of the process and reset on restart. Gauges report current or last sampled values according to their update path. A type declaration does not establish that a gauge has just been refreshed.
Operation families
| Family | Type | Unit | Built-in label |
|---|---|---|---|
skeg_ops_total | Counter | Instrumented operations | op |
skeg_op_duration_seconds_bucket | Cumulative histogram buckets | Seconds | op, le |
skeg_op_duration_seconds_count | Histogram observation count | Observations | op |
skeg_op_duration_seconds_sum | Histogram duration sum | Seconds | op |
The op vocabulary is get, set, del, vset, vsearch, vdel, ping.
These are operation classes, not every RESP command name. KV batches can be
represented by worker operations, and VMSET dispatches individual vector
writes. Successful vector searches are recorded once after the server merges
the shard results.
There is no result-status or tenant label on these built-in operation series. Do not derive a complete request error rate or per-tenant workload by dividing them. Authentication refusals, ingress rejections and failed searches do not all reach the same observation point. Measure caller outcomes separately.
Use histogram functions on bucket rates for latency distributions; the observation sum divided by count is a mean, not a percentile. Keep the scrape window, units, observation volume and selected instances with a reported result.
Memory-governor families
| Metric | Type | Meaning |
|---|---|---|
skeg_memory_budget_state{state="known"} | Gauge | 1 when finite headroom is known; otherwise 0. |
skeg_memory_budget_state{state="unlimited"} | Gauge | 1 when no finite governor budget applies; otherwise 0. |
skeg_memory_budget_state{state="unknown"} | Gauge | 1 when applicable headroom is unreadable; otherwise 0. |
skeg_memory_headroom_bytes | Gauge | Known headroom after the retained reserve; absent in the other two states. |
skeg_memory_reserved_bytes | Gauge | Outstanding memory promises made to admitted work. |
skeg_memory_reserve_bytes | Gauge | The margin retained from admissible headroom. |
The governor publishes these through the shared sampling registry. They are neither RSS nor the process’s total allocation. The headroom value has not had outstanding promises subtracted from it; read the reserved value alongside it. An unlimited budget is not a measurement of available physical RAM.
For settings and platform behaviour, read memory and maintenance.
Maintenance and post-commit failures
| Metric | Event counted |
|---|---|
skeg_maintenance_budget_skips_total | A maintenance attempt deferred because it could not reserve its working set. |
skeg_maintenance_failures_total | An attempted maintenance job failed. |
skeg_maintenance_cleanup_failures_total | A committed maintenance job could not finish cleanup. |
skeg_payload_post_commit_failures_total | Payload indexing or old-blob cleanup failed after a vector committed. |
skeg_vlog_flush_failures_total | A VLog flush failed. |
A counter increase is an event to investigate, not a rollback record. In particular, a post-commit failure can accompany a successfully acknowledged row. Read write outcomes before replaying writes.
The skeg_folds_waiting gauge reports maintenance waiting for a fold permit.
It is a concurrency signal, not a duration or a count of corrupt indexes.
Inspect per-index reports to identify where backlog is accumulating.
Snapshot gauges and process information
Stored VLog and vector-index gauges are refreshed by worker statistics requests. An HTTP scrape serializes their stored values; it does not itself enumerate every index or refresh those worker statistics. Do not assume a zero or a recently scraped value is a fresh complete inventory.
For named-index configuration and counts, use SKEG.VINDEX.INFO <name> and
interpret its coverage and sampling fields. For per-shard operational state,
use SKEG.VINDEX.SHARDS <name>.
SKEG.STATS also includes process-cost values such as RSS, CPU time and file
descriptor information. Those extra lines are not supplied by the common
telemetry dumper alone, so do not assume an HTTP scrape has the same process
series. Collect the process/container envelope with the monitoring tools you
actually deploy.
Shutdown families
skeg_shutdown_started_total, skeg_shutdown_completed_total,
skeg_shutdown_failures_total and skeg_shutdown_connection_timeouts_total
count shutdown lifecycle events. They can change immediately before process
exit. A collector may never scrape the final increment, so use final logs and
the supervisor’s exit result for a particular stop.
See graceful shutdown.
Discover additional series
Inspect # TYPE lines and labels on the running executable before building a
dashboard for an additional metric. Builds and downstream integrations can
expose different registered sources. Record the executable version and check
metric coverage again when upgrading; the presence of a name alone does not
establish its scope, update cadence or a useful alert threshold.