Skip to main content

Automate Log Downloads

Learn how to automate your log downloads.


This section provides information on how to automate the process of accessing and maintaining your logs with a script.

Create a Script

  1. Run the command below to create and access a new local directory:

  2. Choose your preferred method from the Rsync version and SFTP version tabs at the end of this section, and then click the Download button to download the script.

  3. Move the downloaded script to the site-logs directory you created.

  4. Use your preferred text editor to edit collect-logs.sh and replace the xxxxxxx with the appropriate site UUID and environment.

    • Please note that the resulting log file might be large.
Information:
Note

The script provides several modifiable variables described in the comments. Read the comments in the scripts carefully to ensure that you modify variables correctly.

Parameterize the Script

You can run the script with parameters for reusability.

  1. Edit the 'collect-logs-rsync.sh' (you can choose to disable the AGGREGATE_NGINX):
  1. Modify the script access level:
  1. Run the script with parameters. For example:

Collect Logs

You can collect your logs after you create your script.

  1. Navigate to the site-logs directory and then execute the script below to download the logs.
  1. Open the site-logs directory to access the logs.

More Resources