Skip to content

Operational Metrics#

To better understand the behavior of Posit Package Manager, the server allows you to consume operational metrics via a Prometheus compatible HTTP endpoint. This standardized format allows you to monitor the health and behavior of Package Manager.

The configuration Metrics.Enabled = true and Metrics.Listen = 2112 allows Package Manager to export metrics via e.g.: http://localhost:2112/metrics

Monitoring disk usage#

Package Manager disk usage can vary depending on how the service is used. It can be helpful to monitor the exact consumption of the different storage classes. By enabling the Metrics configuration, as well as the StorageAudit configuration, Package Manager provides a way to monitor disk usage over time.


Package Manager provides the usage metrics for each storage class regardless of whether they are mounted on the same device. This will naturally result in duplicated values.

Metric Type Description Labels
rspm_storage_calculation_time Gauge The time in seconds it took to query for file system usage path
rspm_storage_free Gauge The free space of the file system in GB path
rspm_storage_size Gauge The size of the file system in GB path
rspm_storage_used Gauge The used space in this path of the file system in GB path

Monitoring R package binary routing#

Since Posit makes a best effort to serve binaries, there will be cases where a binary simply cannot be located for your environment. In these cases, the R package source will be served instead. You can retrieve the success rate of serving binaries using the provided metrics.

Metric Type Description Labels
binary_routing_binary Counter Binary requests fulfilled. match
binary_routing_distro Counter Binary requests, by distro. distro, status
binary_routing_fallback Counter Binary request failures. reason

Additional Metrics#

Package Manager exposes a number of other Prometheus metrics that can help you understand its behaviour, detect issues, and troubleshoot operational errors:

Metric Type Description Labels
rspm_git_build_duration_seconds Histogram Duration of Git builds, in seconds. None
rspm_git_builds_failed_total Counter Total number of failed Git builds. None
rspm_git_subprocess_cpu_seconds_total Counter CPU usage, in seconds, of Git subprocesses. None
rspm_http_requests_inflight Gauge Number of HTTP requests currently being served. None
rspm_http_requests_total Counter Total HTTP requests served. code, method
rspm_http_response_size_bytes_total Counter Total bytes served in HTTP responses. code, method
rspm_license_expiry Gauge Timestamp for when this node's product license expires. None
rspm_license_days_left Gauge Days remaining until this node's product license expires for easier alerting. None
rspm_repo_source_sync_checkpoints_total Counter Total upstream checkpoints synced by sources. type
rspm_repo_source_sync_completed Gauge Timestamp of the last completed upstream sync. type
rspm_repo_source_sync_duration_seconds Histogram Duration of upstream syncs for sources, in seconds. type
rspm_repo_source_sync_operations_total Counter Total upstream changes synced by sources. type