Setup and administration › Relay server

Set relay connection log retention

Limit how much disk space relay connection logs use on an office device. The records settings let you choose a location, an age limit and a size limit.

Example · Keep seven days of connection logs

  1. Open the office relay’s Records tab and choose Settings on the connection log row.

  2. Select the Connection logs folder. Set retention to 7 days and the maximum size to 64 MB, then save.

  3. Reopen the same row and check the directory and both limits.

The relay records settings retain the selected folder, seven days and 64 MB.

Example: Find a connection in the local log

  1. Open Settings on the Connection log row, called Connection log (local files) on builds with separate destinations. Leave Folder blank to use relay-logs in the relay folder, or choose a writable folder on that device. Keep recording enabled.

  2. With the file destination active, connect a test device as in Set up a relay server. Open the newest .jsonl file in the log folder and look for a new event. The file name includes the node name and the UTC time when the file was opened.

Find the local connection log settings on the Records tab.

Database logs

Under Database, turn on Distributed database and configure the Log database. Set it up while the relay is stopped and check the schema before restarting. On builds with separate log destinations, go to Records and enable Connection log (database). You can keep the local file destination enabled as well. If the Records tab has one Connection log row, setting the log database directs the records there and files are used as a fallback when a database write fails.

Amazon CloudWatch Logs

  1. On builds that show Connection log (CloudWatch Logs), choose its Settings in Records. In AWS, prepare the destination log group and stream. For example, use Region us-east-1, log group fricle-relay, and log stream smoke-node on a test relay. AWS log group and stream instructions.

  2. Enter the Region, Log group, Log stream, and the Access key ID and Secret access key for an AWS identity that can write to that stream. Enable the destination and save. Connect a test device and check the selected stream for a new connection event.

CloudWatch Logs settings in the relay log-channel preview

Retention

The default retention for local log files and database logs is 30 days, with a 1 GiB size limit. Use the settings for the destination to change the period or size limit. CloudWatch Logs uses the retention settings for the AWS log group.