Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

View Logs

Overview

Ops Manager collects log information for both MongoDB and the Ops Manager agents. For MongoDB deployments, Ops Manager provides access to both real-time logs and on-disk logs.

The MongoDB logs provide the diagnostic logging information for your mongod and mongos instances. The Agent logs provide insight into the behavior of your Ops Manager agents.

MongoDB Real-Time Logs

The Monitoring Agent collects real-time log information from each MongoDB deployment by issuing the getLog command with every monitoring ping. The getLog command collects log entries from the MongoDB RAM cache.

Ops Manager enables real-time log collection by default. You can disable log collection for either the whole Ops Manager group or for individual MongoDB instances. If you disable log collection, Ops Manager continues to display previously collected log entries.

View MongoDB Real-Time Logs

1

Select the Deployment tab and then the Deployment page.

2

Click view mode.

3

Click the process.

4

Click the Logs tab.

The tab displays log information. If the tab instead diplays the Collect Logs For Host option, toggle the option to On and refresh the page.

5

Refresh the browser window to view updated entries.

Enable or Disable Log Collection for a Deployment

1

Select the Deployment tab and then the Deployment page.

2

Click view mode.

3

Click the deployment’s gear icon and select Edit Host.

4

Click the Logs tab and toggle the Off/On button as desired.

5

Click X to close the Edit Host box.

The deployment’s previously existing log entries will continue to appear in the Logs tab, but Ops Manager will not collect new entries.

Enable or Disable Log Collection for the Group

1

Select the Administration tab, then the Group Settings page.

2

Set the Collect Logs For All Hosts option to On or Off, as desired.

MongoDB On-Disk Logs

Ops Manager can collect on-disk logs even if the MongoDB instance is not running. The Automation Agent collects the logs from the location specified by the MongoDB systemLog.path configuration option. The MongoDB on-disk logs are a subset of the real-time logs and therefore less verbose.

You can configure log rotation for the on-disk logs. Ops Manager enables log rotation by default.

View MongoDB On-Disk Logs

1

Select the Deployment tab and then Mongo Logs page.

Alternatively, you can select the Deployment page’s edit mode, then the arrow to the right of a deployment, then the gear icon drop-down list, and then Request Logs.

2

Request the latest logs.

To request the latest logs:

  1. Click the Manage drop-down button and select Request Server Logs.
  2. Select the checkboxes for the logs you want to request, then click Request Logs.
3

Configure Log Rotation

1

Select the Deployment tab and then Mongo Logs page.

2

Click the Manage drop-down button and select MongoDB Log Settings.

3

Configure the log rotation settings and click Save.

4

Click Review & Deploy.

5

Click Confirm & Deploy.

Agent Logs

Ops Manager collects logs for all your Automation Agents, Monitoring Agents, and Backup Agents.

View Agent Logs

1

From any page, click an agent icon at the top of the page and select Logs.

Ops Manager opens the Agent Logs page and displays the log entries for agents of the same type.

You can also open the Agent Logs page by selecting the Administration tab, then Agents page, and then view logs link for a particular agent. The page displays the agent’s log entries.

2

Filter the log entries.

Use the drop-down list at the top of the page to display different types of agents.

Use the gear icon to the right of the page to clear filters and to export logs.

Configure Agent Log Rotation

1

Select the Administration tab and then Agents page.

2

Edit the log settings.

Under the Agent Log Settings header, click the pencil icon to edit the log settings for the appropriate agent.

You can modify the following fields:

Name Type Description
Linux Log Path string The path to which the agent writes its logs.
Rotate Logs boolean Specifies whether Ops Manager should rotate the logs for the agent.
Size Threshold (MB) number Max size in MB for an individual log file before rotation.
Time Threshold (Hours) integer Max time in hours for an individual log file before rotation.
Max Uncompressed Files integer Optional Max number of total log files to leave uncompressed, including the current log file.
Max Percent of Disk number Optional Max percent of the total disk space all log files can occupy before deletion.

When you are done modifying the agent log settings, click Confirm.

3

Return to the Deployment page

4

Click Review & Deploy.

5

Click Confirm & Deploy.