How to Change the Default Log Folder Path?
Question
How to change the default log folder path?
Environment
Container platform: Docker
Answer
During the initial setup of the Hybrid Deployment Agent, the log folder path defaults to $HOME/fivetran/logs. The agent uses this path to create a mount volume on the host for persisting agent and job logs.
To mount a different log folder, follow the steps for your installation method:
Automated installation
- Open the
hdagent.shscript. - Update the
LOGDIRvariable to match your custom host log directory:LOGDIR=<custom_log_dir> - In the
docker runcommand, change:to:-v $BASE_DIR/logs:/logs-v <custom_log_dir>:/logs
Manual installation
In your docker run command, change:
-v $HOME/fivetran/logs:/logs
to:
-v <custom_log_dir>:/logs
For reference, the relevant section of the full docker run command looks like this:
docker run \
-d \
--restart "on-failure:3" \
--pull "always" \
--security-opt label=disable \
--label fivetran=ldp \
--label ldp_process_id=default-controller-process-id \
--label ldp_controller_id=$CONTROLLER_ID \
--name controller \
--network fivetran_ldp \
--env HOST_USER_HOME_DIR=$HOME \
--env CONTAINER_ENV_TYPE="docker" \
-v $HOME/fivetran/conf:/conf \
-v <custom_log_dir>:/logs \
-v $SOCKET:/var/run/docker.sock \
us-docker.pkg.dev/prod-eng-fivetran-ldp/public-docker-us/ldp-agent:production -f /conf/config.json