Health and metrics names
Generated from
src/http/healthcheck.cr,src/event/loss.cr,src/event/consumer_health.cr, andsrc/metrics.crbymake gen-docs-health-metrics. Do not edit this file by hand.
Use this page to read a probe answer or to name a metric in your dashboards and alerts.
The server exposes two probes and one scrape endpoint:
GET /Healthcheckchecks readiness.GET /Healthcheck/livechecks liveness.GET /metricsserves the Prometheus text exposition format 0.0.4.
Both probes answer without authentication. The readiness probe answers HTTP 503 when a dependency is unreachable or a stream consumer is degraded.
Health probe
Section titled “Health probe”Everything GET /Healthcheck returns. A [] path is one entry of the
array field: the probe returns one pool entry per database pool and one
consumer entry per stream consumer group. The live probe returns only the
two live.* fields.
| Field | Meaning |
|---|---|
database.error |
The first pool error, when a pool is broken. |
database.pools[].database |
The database entry name from the route table. |
database.pools[].error |
The error this pool raised, when it is broken. |
database.pools[].role |
The pool role: rw or ro. |
database.pools[].status |
ok when this pool answers the SELECT 1 probe. |
database.status |
ok when every pool answers the SELECT 1 probe. |
event_lag.max_lag |
Largest consumer-group lag the last lag-check pass observed. |
event_loss.messages_dropped |
Dispatched messages dropped by handler errors since process start. |
event_loss.publish_events_dropped |
Events dropped by failed publish flushes since process start. |
event_loss.publish_flush_failures |
Failed publish flushes since process start. |
events.consumers[].consecutive_failures |
Failed loop turns in a row for this consumer. |
events.consumers[].last_error |
The last error message this consumer reported. |
events.consumers[].last_success_at |
RFC-3339 time of the consumer’s last successful loop turn. |
events.consumers[].name |
The stream consumer group name. |
events.consumers[].restarts |
Supervised restarts of this consumer since process start. |
events.status |
ok, in_process under the in-process manager, or degraded when a consumer reports consecutive failures. |
redis.error |
The Redis error, when the probe fails. |
redis.status |
ok when Redis answers, in_process under the in-process manager, error when unreachable. |
service.env |
The APP_ENV the process boots in. |
service.instance_id |
One instance id per boot; matches the boot log and the shard-lock holders in Redis. |
status |
ok when every dependency passes, degraded otherwise; HTTP 200 answers ok, HTTP 503 answers degraded. |
live.status |
Always ok while the process answers. |
live.uptime_seconds |
Seconds since the process started. |
Metrics
Section titled “Metrics”Every metric name the server emits, with its exposition type. The same registry also renders any uncataloged name as a counter with a generic help line; the catalog below is the complete documented set.
| Name | Type | Meaning |
|---|---|---|
facet_consumer_consecutive_failures |
gauge | Consecutive failed loop turns per stream consumer group. |
facet_consumer_restarts_total |
counter | Supervised fiber restarts per stream consumer group since process start. |
facet_cron_task_failures_total |
counter | Cron task firings that raised, per task id. |
facet_cron_task_lease_skips_total |
counter | Cron task dispatches skipped because another instance holds the tick lease, per task id. |
facet_db_checkout_total |
counter | Pooled connection checkouts, by database entry and pool role (rw/ro). |
facet_event_lag_max |
gauge | Maximum consumer-group lag observed by the last Cron::EventLagCheck pass. |
facet_event_loss_messages_dropped_total |
counter | Dispatched messages swallowed by handler errors since process start. |
facet_event_loss_publish_events_dropped_total |
counter | Events dropped by failed publish flushes since process start. |
facet_event_loss_publish_flush_failures_total |
counter | Failed Event::Publisher.flush calls since process start. |
facet_events_published_total |
counter | Resource events written to the Redis streams by this process. |
facet_fiber_loop_errors_total |
counter | Long-lived loop turns that rescued an exception, by fiber name. |
facet_fiber_restarts_total |
counter | Supervised fiber restarts, by fiber name, since process start. |
facet_http_requests_total |
counter | HTTP requests handled, by method, route group, and status class. |
facet_jobs_abandoned_total |
counter | Background job rows requeued by the expired-lease sweep, per kind. |
facet_jobs_claimed_total |
counter | Background job rows claimed by the worker, per kind. |
facet_jobs_enqueued_total |
counter | Background job rows inserted, per kind. |
facet_jobs_failed_total |
counter | Background job attempts written as failed, per kind. |
facet_jobs_succeeded_total |
counter | Background job attempts written as succeeded, per kind. |
facet_messages_processed_total |
counter | Stream messages dispatched to a subscription handler, per consumer group. |