- MongoDB Agent >
- Update Agent to Enable Fatal Log Rotation
Update Agent to Enable Fatal Log Rotation¶
For MongoDB Agent versions below 12.0.21, you must reinstall the MongoDB Agent to enable fatal log file rotation.
In MongoDB Agent versions 12.0.21 and above, 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:
- RPM
- DEB
- TAR
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:
If you started your agent process with init.d
, run the following
command:
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:
To start the agent process with init.d
, run the following
command:
The reinstalled MongoDB Agent rotates automation-agent-fatal.log
on a regular basis.
Stop the MongoDB Agent.¶
Stop the MongoDB Agent using the following command:
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:
The reinstalled MongoDB Agent rotates automation-agent-fatal.log
on a regular basis.
Stop the MongoDB Agent.¶
Stop the MongoDB Agent using the following command:
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.
Start the MongoDB Agent.¶
Using your terminal, run the following command with:
- The path to your configuration file
- The path to save the fatal log file