Docs Menu
Docs Home
/
MongoDB Cloud Manager
/

Update Agent to Enable Fatal Log Rotation

If you have upgraded the MongoDB Agent to 12.8 or later from 12.7 or earlier, you must manually reinstall your current MongoDB Agent version (12.8+) to enable fatal log file rotation.

For new installations of the MongoDB Agent (12.8+), fatal log file rotation is automatically enabled.

Note

Fatal log file rotation helps to maintain a useful automation-agent-fatal.log file by rotating the file on a regular basis and deleting only the oldest logs.

To reinstall the MongoDB Agent to enable fatal log file rotation, follow the procedure for your distribution:

1

Stop the MongoDB Agent using the appropriate command for your agent process.

If you started your agent process with systemd, run the following command:

sudo systemctl stop mongodb-mms-automation-agent.service

If you started your agent process with init.d, run the following command:

sudo service mongodb-mms-automation-agent stop
2

Use the installation instructions that apply to your MongoDB Agent use case:

At the top of the installation page, select RHEL/CentOS/SLES/AMZ and follow the procedure to install the MongoDB Agent.

3

Using your terminal, start the MongoDB Agent with the appropriate command for your system:

To start the agent process with systemd, run the following command:

sudo systemctl start mongodb-mms-automation-agent.service

To start the agent process with init.d, run the following command:

sudo service mongodb-mms-automation-agent start

The reinstalled MongoDB Agent rotates the automation-agent-fatal.log file when the MongoDB Agent restarts or when the file reaches 100 MiB.

The MongoDB Agent retains the new automation-agent-fatal.log file and five rotated logs.

1

Stop the MongoDB Agent using the following command:

sudo systemctl stop mongodb-mms-automation-agent.service
2

Use the installation instructions that apply to your MongoDB Agent use case:

At the top of the installation page, select Ubuntu/ Debian and follow the procedure to install the MongoDB Agent.

3

Using your terminal, start the MongoDB Agent with the following command:

sudo systemctl start mongodb-mms-automation-agent.service

The reinstalled MongoDB Agent rotates the automation-agent-fatal.log file when the MongoDB Agent restarts or when the file reaches 100 MiB.

The MongoDB Agent retains the new automation-agent-fatal.log file and five rotated logs.

1

Stop the MongoDB Agent using the following command:

pkill -f mongodb-mms-automation-agent
2

Use the installation instructions that apply to your MongoDB Agent use case:

At the top of the installation page, select Linux and follow the procedure to install the MongoDB Agent.

3

Using your terminal, run the following command with:

  • The path to your configuration file

  • The path to save the fatal log file

nohup /bin/bash -c "./mongodb-mms-automation-agent --config=./example/path/to/config 2>&1 | ./fatallogger -logfile ./example/path/to/log 2>&1"

Back

Manage Agent API Keys