9 Historical Metrics
This section describes the configuration and management of historical metrics, enabled with the
RStudio Connect uses a separate
rserver-monitor process to record resource (CPU, memory, etc.) usage over time. It is only active when historical metrics are enabled. The customization settings described in the remainder of this section have no effect when
Metrics.Enabled is off.
9.1 Historical Metrics Settings
Metrics data is written by default to a set of RRD files. This data is stored by default at
/var/lib/rstudio-connect/metrics. You can specify an alternate data path by using the
DataPath setting mentioned in Section 10.14.
rserver-monitor process runs (by default) with the same user account Connect uses to run its R processes. By default, this user account is
rstudio-connect (see the
RunAs setting in Section 10.1). You can specify an alternate user account for the
rserver-monitor process by modifying the
User setting. See Section 10.14 for details.
RStudio Connect also supports logging of metrics to Graphite, and it supports disabling its default behavior of logging to RRD. Please see Section 10.14 for more options for configuring the historical metrics in Connect.
9.2 Historical Metrics Process Management
Connect automatically spawns a process (
rserver-monitor) to help maintain historical data. If this process exits, Connect will restart it in an attempt to record as much historical information as possible. Connect will delay restarting
rserver-monitor if it observes rapid, repeated failures.
rserver-monitor needs permission to write data to the metrics data directory, Connect attempts to ensure the necessary permissions at startup. When Connect starts, it grants ownership of the metrics data directory to the user account that will be used to start
9.3 Historical Metrics Process Logging
rserver-monitor process logs its output to syslog. If the process is unable to run, you can check the system log (e.g.,
/var/log/syslog) for messages.