Navigation

MongoDB Agent Settings

This page describes possible settings for the MongoDB Agent. These values are set after first launching Cloud Manager and not through manual editing of these files.

Warning

If you edit authentication or TLS settings through Settings or Deployments in the Cloud Manager interface, those changes overwrite any manual changes in this configuration file.

Configuration File Location on Each Platform

The location of the MongoDB Agent configuration file depends on your platform. On some platforms, the MongoDB Agent configuration file is named automation-agent.config as a way to enable easier upgrades for those using legacy agents.

Platform Installation Method Default Config File Path
RHEL, CentOS, Amazon Linux and Ubuntu package manager /etc/mongodb-mms/automation-agent.config
macOS or other Linux distributions tar /path/to/install/local.config
Windows msi C:\MMSData\Automation\automation-agent.config

MongoDB Agent Settings

The following settings are required. All other settings are set to default values.

mmsGroupId

Type: string

Required.

Specifies the ID of your Cloud Manager project. In Cloud Manager, click Deployments, then Agents and then select the appropriate operating system under Downloads & Settings.

When the Install Agent Instructions box appears, these values can be copied directly from this box by clicking copy icon .

mmsGroupId=8zvbo2s2asigxvmpnkq5yexf
mmsApiKey

Type: string

Required.

Specifies the Cloud Manager agent API key of your Cloud Manager project.

You can use an Agent API key that you have already generated for the project. Otherwise, you can generate a new Agent API key. A project can have more than one Agent API key, and any of the project’s agents can use any of the keys. For more information, see Manage Agent API Keys.

To generate an Agent API key, go to the Agent API Keys tab. To navigate to the tab, from the Deployment view, click the Agents tab and then the Agent API Keys tab.

Important

When you generate an Agent API Key, Cloud Manager displays it one time only. You must copy this key. Treat it like a password; store it in a secure place. Cloud Manager never displays the full key again.

mmsGroupId=8zvbo2s2asigxvmpnkq5yexf
mmsBaseUrl

Type: string

Specifies the URL of the Cloud Manager.

Important

This value is set by default and should not be modified.

mmsBaseUrl=https://api-agents.mongodb.com

Logging Settings

logFile

Type: string

Specifies the path to which Cloud Manager should write the MongoDB Agent’s log.

The default path depends on your platform. The MongoDB Agent uses the default filename automation-agent.log whether or not the deployment uses Automation.

Platform Default Path
Linux /var/log/mongodb-mms-automation/automation-agent.log
Windows C:\MMSAutomation\log\mongodb-mms-automation\automation-agent.log
logFile=/path/to/mongodb-mms-automation/automation-agent.log
logLevel

Type: string

Specifies the level of logging granularity.

Choose from the following severity levels, from most to least amount of information:

  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL

By default, logLevel is INFO.

logLevel=ROUTINE

Each level includes the log items included in the succeeding levels.

Example

  • If you choose DEBUG, the MongoDB Agent logs all messages, including INFO, WARN, ERROR and FATAL.
  • If you choose FATAL, the MongoDB Agent only logs FATAL messages.
maxLogFiles

Type: integer

Specifies the maximum number of rotated log files to retain.

By default, maxLogFiles is 10. You can change the value to retain a different quantity of rotated log files.

maxLogFiles=15
maxLogFileDurationHrs

Type: float

Specifies the number of hours after which the logs are rotated.

Manually Rotate the MongoDB Agent Logs

On UNIX- and Linux-based systems you can manually rotate the MongoDB Agent logs. Issue a kill command with the SIGUSR1 signal for the Agent process:

kill -SIGUSR1 <AgentID>

On Windows-based systems, you can manually restart the MongoDB Agent with a Service restart:

  1. Click the Start menu.
  2. Search for services.
  3. Find the MongoDB Agent.
  4. Right-click on the Agent and click Restart.

This rotates the MongoDB Agent logs.

maxLogFileSizeBytes

Type: integer

Specifies the maximum size, in bytes, of a log file before the logs are rotated. If unspecified, the MongoDB Agent does not rotate logs based on file size.

maxLogFileSizeBytes=536870912

Connection Settings

dialTimeoutSeconds

Type: integer

Specifies the number of seconds to wait before a connection times out. By default, connections time out after 40 seconds. However, The MongoDB Agent may frequently time out of connections for one or more of the following reasons:

  • High network latency
  • High server load
  • Large TLS keys
  • Lack of TLS accelerator
  • Insufficient CPU speed

MongoDB recommends gradually increasing the value of the dialTimeoutSeconds MongoDB Agent configuration setting to prevent frequent premature connection timeouts.

dialTimeoutSeconds=40

Note

Increasing this value also increases the time required to deploy configuration changes to the MongoDB Agent. Experiment with small, incremental increases until you determine the optimum value for your deployment.

HTTP Proxy Settings

httpProxy

Type: string

Specifies the URL of an HTTP proxy server the MongoDB Agent can use.

httpProxy=http://proxy.example.com:8080

Configuration Backup Settings

mmsConfigBackup

Type: string

Specifies the path to the Cloud Manager configuration backup file. This file describes the desired state of the deployment.

mmsConfigBackup=/path/to/mms-cluster-config-backup.json

Note

When Ops Manager is installed, it stores the configuration backup file is stored in one of the following places, depending on your platform:

Platform Configuration Backup File Path
Linux /var/lib/mongodb-mms-automation/
Windows %SystemDrive%\MMSAutomation

Cloud Manager TLS Settings

Specify the settings that the MongoDB Agent uses when communicating with Cloud Manager using TLS.

sslTrustedMMSServerCertificate

Type: string

Specifies the absolute path that contains the trusted Certificate Authority certificates in PEM format. This certificate verifies that the MongoDB Agent is talking to the designated Cloud Manager instance.

sslTrustedMMSServerCertificate=/path/to/ca.pem

Note

If you need to have your MongoDB Agents download their MongoDB installers from the Internet while using TLS and a private Certificate Authority signed your certificates (sslTrustedMMSServerCertificate parameter is set), raise a ticket with MongoDB Support to help you configure your Cloud Manager.

sslRequireValidMMSServerCertificates

Type: boolean

Specifies if the MongoDB Agent should validate TLS certificates presented by Cloud Manager.

Warning

Setting this option to false disables certificate verification and makes connections between the MongoDB Agent and Cloud Manager susceptible to man-in-the-middle attacks. Setting this option to false is only recommended for testing purposes.

sslRequireValidMMSServerCertificates=true

Automation Settings

The following configuration settings are used for authentication in automated clusters.

MongoDB Kerberos Settings

Specify these settings if Automation authenticates to hosts using Kerberos. To configure Kerberos, see Configure the Monitoring Agent for Kerberos.

krb5ConfigLocation

Type: string

Specifies an absolute path to an non-system-standard location for the Kerberos configuration file.

krb5ConfigLocation=/path/to/krb_custom.conf

Note

Cloud Manager creates a Kerberos Credential (Ticket) Cache for each agent automatically when Kerberos is enabled. If you want to override the location of the Kerberos Credential Cache, you must set the KRB5CCNAME environment variable to the desired file name and path before running the agent.

backupAgentKrb5CCName

Type string

Specifies the KRB5CC environment variable that the MongoDB Agent sets for the Backup process. Used only to authenticate the Backup to your MongoDB deployment when the MongoDB Agent starts the Backup function.

backupAgentKrb5CCName=/path/to/credentials_cache_file
monitoringAgentKrb5CCName

Type string

Specifies the KRB5CC environment variable that the MongoDB Agent sets for the Monitoring function. Used only to authenticate Monitoring to your MongoDB deployment when the MongoDB Agent starts the Monitoring function.

monitoringAgentKrb5CCName=/path/to/credentials_cache_file

Monitoring Settings

Use the Cloud Manager interface to configure Monitoring settings.

Log Settings

  1. In the navigation, click Deployment.

  2. Click the Agents tab.

  3. Click Downloads & Settings.

  4. In the Agent Log Settings section, click edit icon next to Monitoring Log Settings.

  5. Edit the Monitoring log settings:

    Setting Default Value UI Suggested Value
    Linux Log File Path /var/log/mongodb-mms-automation/monitoring-agent.log  
    Windows Log File Path %SystemDrive%\MMSAutomation\log\mongodb-mms-automation\monitoring-agent.log  
    Rotate Logs YES  
    Size Threshold (MB) 1000  
    Time Threshold (Hours) 24  
    Max Uncompressed Files   5
    Max Percent of Disk   2
  6. Click Save.

Custom Settings

  1. In the navigation, click Deployment.
  2. Click the Agents tab.
  3. Click Downloads & Settings.
  4. In the Custom Configuration section, next to Edit Custom Configurations, click edit icon .
  5. Enter the Monitoring configuration setting and value.
  6. Click Save and Close.

You can configure the following Monitoring settings:

Note

The following settings are deprecated:

Backup Settings

Use the Cloud Manager interface to configure Backup settings.

Log Settings

  1. In the navigation, click Deployment.

  2. Click the Agents tab.

  3. Click Downloads & Settings.

  4. In the Agent Log Settings section, click edit icon next to: guilabel:Backup Log Settings.

  5. Edit the Backup log settings:

    Setting Default Value UI Suggested Value
    Linux Log File Path /var/log/mongodb-mms-automation/backup-agent.log  
    Windows Log File Path %SystemDrive%\MMSAutomation\log\mongodb-mms-automation\backup-agent.log  
    Rotate Logs YES  
    Size Threshold (MB) 1000  
    Time Threshold (Hours) 24  
    Max Uncompressed Files   5
    Max Percent of Disk   2
  6. Click Save.

Custom Settings

  1. In the navigation, click Deployment.
  2. Click the Agents tab.
  3. Click Downloads & Settings.
  4. In the Custom Configuration section, next to Edit Custom Configurations, click edit icon .
  5. Enter a Backup configuration setting and value.
  6. Click Save and Close.

You can configure the following Backup settings: