Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Monitoring

Three surfaces report the state of a Corium system: the metrics endpoint, corium db stats, and the tracing log.

The metrics endpoint

Pass --metrics-listen to a transactor or a peer server:

corium transactor --data-dir /srv/corium --metrics-listen 127.0.0.1:9464

The endpoint serves Prometheus text at /metrics.

CAUTION: Keep the metrics listener on a private operations network. The endpoint has no bearer-token authentication.

Transactor metrics

MetricTypeMeaning
corium_transactor_transactions_totalCounterCommitted transactions.
corium_transactor_transaction_failures_totalCounterRejected transactions.
corium_transactor_transaction_latency_secondsHistogramCommit latency.
corium_transactor_queue_depthGaugeCommit queue depth.
corium_transactor_index_duration_secondsHistogramIndex publication duration.
corium_transactor_gc_runs_totalCounterCollection runs.
corium_transactor_gc_swept_blobs_totalCounterBlobs deleted.
corium_transactor_gc_retained_blobs_totalCounterUnreachable blobs kept by the window.
corium_keys_unavailableGaugeNodes that cannot load a key manifest change.

Peer server metrics

MetricTypeMeaning
corium_peer_queries_totalCounterQueries served.
corium_peer_query_latency_secondsHistogramQuery latency.
corium_peer_query_fuel_spent_totalCounterDatoms touched.

Segment cache metrics

A peer server with --segment-cache-dir adds these.

MetricLabelsMeaning
corium_peer_segment_cache_requests_totalresult, tierHits and misses per tier.
corium_peer_segment_cache_native_fetches_totalresultFetches that went to storage.
corium_peer_segment_cache_bytes_read_totalsourceBytes read per source.
corium_peer_segment_cache_admissions_totalresultAdmissions and rejections.
corium_peer_segment_cache_used_bytestierBytes in use.
corium_peer_segment_cache_capacity_bytestierConfigured capacity.

On-demand statistics

corium db stats people

The command prints the basis, the index basis, the index lag, the counts, and the transactor counters. See the database catalog.

The transactor Status call carries the same data. The Metrics panel of corium tui samples it live, and it is the only surface that shows lease ownership.

Auditing schema changes

Every applied schema update records its requester, its digests, its observed basis, and its acknowledgements on the transaction entity. Those are ordinary attributes, so the schema history of a database is a query.

[:find ?when ?who ?tool
 :where [?tx :db.schemaUpdate/requester ?who]
        [?tx :db.schemaUpdate/tool ?tool]
        [?tx :db/txInstant ?when]]
[[#inst 1785899778642 "static-token:operator" "corium-cli/0.1.0"]]

The requester is the authenticated principal. A caller never supplies it.

An ordinary transaction cannot write :db.schemaUpdate/*, so no transaction can claim to have been a schema update. See schema management.

Logging

Tracing is human-readable by default. --log-format json writes structured logs, and RUST_LOG filters them.

RUST_LOG=corium_transactor=info,corium_peer=warn \
  corium --log-format json transactor --data-dir /srv/corium

--log-format is a global flag, so it comes before the subcommand.

Useful targets:

TargetContent
corium_transactorCommit pipeline, indexing, leases, garbage collection.
corium_peerConnection, subscription, failover.
corium_authz::auditEvery authorization decision, with its basis. Denials at info, grants at debug.

Log lines worth an alert:

  • standby took over write lease — a failover happened.
  • deposed — this member lost the lease. It stands down on its own.
  • standing by; lease held elsewhere — normal on a standby at startup.

What to alert on

SignalConditionMeaning
Index lagGrows without limitPublication cannot keep up.
corium_transactor_queue_depthStays highThe write path is saturated.
corium_transactor_transaction_failures_totalRises sharplyValidation errors, or a fenced writer.
corium_keys_unavailableAbove zeroA node cannot load a key manifest change.
corium_transactor_gc_retained_blobs_totalGrows steadilyStorage is not being reclaimed.
Lease ownerChanges unexpectedlyAn unplanned failover.

Peer memory is not exported as a metric. Watch the resident memory of the process, because a peer holds the whole history. See indexes and storage.