Navigation
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

Click Deployment, then the Processes tab, then the Topology view.

2

If the process is part of a sharded cluster, click the filter button for the type of process.

Click one of the following:

Shards Displays the mongod processes that host your data.
Configs Displays the mongod processes that run as config servers to store a sharded cluster’s metadata.
Mongos Displays the mongos processes that route data in a sharded cluster.
3

On the line listing the process, click Metrics.

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

Click Deployment, then the Processes tab, then the Topology view.

2

On the line for any process, click the ellipsis icon and select Monitoring Settings.

3

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

4

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

Click Settings, then Group Settings.

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

Click Deployment, then the More drop-down list, then MongoDB Logs.

Alternatively, you can select the ellipsis icon for a process and select 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

Click Deployment, then :the More drop-down list, then MongoDB Logs.

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

Click Deployment, then the Agents tab, then Agent Logs.

The page displays logs for the type of agent selected in the View drop-down list. The page filters logs according to any filters selected in through the gear icon.

2

Filter the log entries.

To display logs for a different type of agent, use the View drop-down list.

To display logs for a specific hosts or MongoDB processes, click the gear icon and make your selections.

To clear filters, click the gear icon and click Remove Filters.

To download the selected logs, click the gear icon and click Download as CSV File.

Note

To view logs for a specific agent, you can alternatively click the Agents tab’s All Agents list and then click view logs for the agent.

Configure Agent Log Rotation

1

Click Deployment, then the Agents tab.

2

Click Downloads & Settings.

3

Scroll down to the Agent Log Settings section.

4

Edit the log settings.

Click the pencil icon to edit an agent’s log settings. You can edit the following settings. When you are done, click Confirm:

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.
5

Click Review & Deploy to review your changes.

6

Review and approve your changes.

Ops Manager displays your proposed changes.

  1. If you are satisfied, click Confirm & Deploy.
  2. Otherwise, click Cancel and you can make additional changes.