Skip to content
ricochet

Metrics

Ricochet captures metrics that are exposed via a Prometheus server. The metrics are served at /metrics on port 6189 by default.

For example, to access the metrics from localhost:

Terminal window
curl http://localhost:6189/metrics

These metrics are on a separate port than ricochet so that they can be kept on an internal network.

Set the metrics address with metrics in the [network] section of ricochet-config.toml. Set it to 0.0.0.0:6189 when Prometheus scrapes from another host.

Add ricochet as a target in prometheus.yml:

scrape_configs:
- job_name: ricochet
static_configs:
- targets: ["localhost:6189"]
MetricTypeLabelsDescription
ricochet_requests_totalCountertype, content_id, status, methodRequests served.
ricochet_connections_totalCountertype, content_idConnections opened.
ricochet_invocations_started_totalCountercontent_idInvocations started.
ricochet_invocations_completed_totalCountercontent_id, statusInvocations completed.
ricochet_invocation_duration_secondsHistogramcontent_idTime an invocation took to complete.
ricochet_app_instances_started_totalCountercontent_idApp instances started.
ricochet_app_instances_stopped_totalCountercontent_idApp instances stopped.
ricochet_request_duration_secondsHistogramtype, content_idTime to serve a request. WebSocket connections are not included.
MetricLabelsDescription
ricochet_active_processestype, content_idProcesses currently running.
ricochet_connectionstype, content_idConnections currently open.
ricochet_memory_bytestype, content_idMemory currently in use.
ricochet_peak_memory_bytestype, content_idHighest memory use observed.
ricochet_cpu_corestype, content_idCPU currently in use, in cores.
ricochet_longest_active_secondstype, content_idAge of the longest running process.
ricochet_last_invocation_timestamp_secondscontent_idUnix time of the most recent invocation.
ricochet_build_infoversion, commitAlways 1. The labels show which ricochet build is running.