Historical metrics in RStudio Connect


This article is based on this section of the administrator's guide.

The historical metrics are enabled with the Metrics.Enabled setting in the configuration file.

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.

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 DataPathsetting mentioned in this section of the administrator's guide.

The 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 this section of the administrator's guide). You can specify an alternate user account for the rserver-monitor process by modifying theUser setting. See this section of the administrator's guide for details.

RStudio Connect also supports logging of metrics to Graphite, and it supports disabling its default behavior of logging to RRD. Please see this section of the administrator's guide for more options for configuring the historical metrics in Connect.

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.

Since the 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 rserver-monitor.

Historical Metrics Process Logging

The 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/messages or /var/log/syslog) for messages.

Have more questions? Submit a request


Powered by Zendesk