- Administer Ops Manager >
- Manage Ops Manager Application Logs
Manage Ops Manager Application Logs¶
On this page
In addition to
viewing logs for mongod
and
mongos
processes and agents, you can explore
Ops Manager logs, such as its
access and backup logs.
You can change how long you store some of the Ops Manager logs. Setting this retention policy can keep Ops Manager consistent with your organization’s data retention policies.
Available Ops Manager Logs¶
Ops Manager Application stores its own logs in the
/opt/mongodb/mms/logs/
directory of each Ops Manager host.
Some of the logs have a configuration file that Ops Manager maintains. Ops Manager rotates such logs daily. For these logs, Ops Manager:
- Closes the current file.
- Compresses the closed file using
gzip
. - Starts a new log file.
Ops Manager retains each compressed file for 30 days, then deletes the compressed file.
You can change the retention policy of the following logs:
Log File Name | Log Contents | Configuration File |
---|---|---|
mms[#].log , typically mms0.log |
Ops Manager operations | logback.xml |
daemon.log |
Ops Manager backup operations | logback.xml |
mms[#]-access.log , typically mms0-access.log |
Ops Manager access attempts | logback-access.xml |
mms[#]-startup.log , typically mms0-startup.log |
Ops Manager startup process messages | logback-access.xml |
You can manage the retention policy of the following logs using your platform’s tools:
daemon-startup.log |
Ops Manager backup process startup process messages |
mms-migration.log |
Ops Manager migration process messages |
Ops Manager may generate additional log files in extenuating circumstances. If you find files in the log directory that aren’t listed in these tables, contact MongoDB Support for assistance.
Change Ops Manager Log Retention¶
If Ops Manager Application logs have configuration files, you can change their log retention using these files. You cannot change log retention of these log files in the console.
Important
If you upgrade Ops Manager, it overwrites its configuration files. To customize log retention after you upgrade, repeat the steps in this procedure.
Locate the configuration file.¶
Navigate to the /opt/mongodb/mms/conf/
directory,
and locate the corresponding configuration file.
- To change retention for
mms0.log
ordaemon.log
, openlogback.xml
. - To change retention for
mms0-access.log
ormms0-startup.log
, openlogback-access.xml
.
Open the configuration file.¶
Open the file in your preferred editor.
Example
The following configuration file excerpt specifies a log retention policy of 45 days.
Specify a new log retention value.¶
Change the value between the <maxHistory>
tags, in days,
to retain compressed log files.
Save the file.¶
Restart Ops Manager for the changes to take effect.¶
To learn more, see Start and Stop Ops Manager Application.
Change Ops Manager Log Rotation Policy¶
By default, Ops Manager rotates and compresses its logs once per day. If you have large log files, you can also rotate them by size.
To change your rotation policy to rotate logs by size and time:
Locate the configuration file.¶
Navigate to the /opt/mongodb/mms/conf/
directory,
and locate the corresponding configuration file.
- To change the rotation policy for
mms0.log
ordaemon.log
, openlogback.xml
. - To change the rotation policy for
mms0-access.log
ormms0-startup.log
, openlogback-access.xml
.
Open the configuration file.¶
Open the file in your preferred editor.
Example
The following configuration file excerpt shows the default time based rotation policy.
Specify the new log rotation policy.¶
Change the class
attribute in the <rollingPolicy>
tag to match
the following entry:
Save the file.¶
Restart Ops Manager for the changes to take effect.¶
To learn more, see Start and Stop Ops Manager Application.