14 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.
14.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 15.15.
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 15.12). You can specify an alternate user account for the
rserver-monitor process by modifying the
User setting. See Section 15.15 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 15.15 for more options for configuring the historical metrics in Connect.
14.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
14.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.