Update Agent to Enable Fatal Log Rotation
- OAuth 2.0 authentication for programmatic access to Cloud Manager is available as a Preview feature.
- The feature and the corresponding documentation might change at any time during the Preview period. To use OAuth 2.0 authentication, create a service account to use in your requests to the Cloud Manager Public API.
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.
Reinstall the MongoDB Agent
To reinstall the MongoDB Agent to enable fatal log file rotation, follow the procedure for your distribution:
Stop the MongoDB Agent.
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
Reinstall the MongoDB Agent.
Use the installation instructions that apply to your MongoDB Agent use case:
If you use MongoDB Agent to manage deployments, follow the instructions to Install the MongoDB Agent to Manage Deployments, or
If you use MongoDB Agent to only monitor or back up deployments, follow the instructions to Install the MongoDB Agent to Only Monitor or Backup Deployments.
At the top of the installation page, select
RHEL/CentOS/SLES/AMZ
and follow the procedure to install
the MongoDB Agent.
Start the MongoDB Agent.
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.
Reinstall the MongoDB Agent.
Use the installation instructions that apply to your MongoDB Agent use case:
If you use MongoDB Agent to manage deployments, follow the instructions to Install the MongoDB Agent to Manage Deployments, or
If you use MongoDB Agent to only monitor or back up deployments, follow the instructions to Install the MongoDB Agent to Only Monitor or Backup Deployments.
At the top of the installation page, select
Ubuntu/ Debian
and follow the procedure to install
the MongoDB Agent.
Start the MongoDB Agent.
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.
Reinstall the MongoDB Agent.
Use the installation instructions that apply to your MongoDB Agent use case:
If you use MongoDB Agent to manage deployments, follow the instructions to Install the MongoDB Agent to Manage Deployments, or
If you use MongoDB Agent to only monitor or back up deployments, follow the instructions to Install the MongoDB Agent to Only Monitor or Backup Deployments.
At the top of the installation page, select
Linux
and follow the procedure to install
the MongoDB Agent.