Install or Update the Monitoring Agent through Automation

The Cloud Manager Monitoring Agent is a lightweight component that runs within your infrastructure, connects to your MongoDB processes, collects data about the state of your deployment, and then sends the data to Cloud Manager, which processes and renders this data. The agent initiates all connections between the agent and Cloud Manager, and communications between the agent and Cloud Manager are encrypted.

A single agent can collect data for your entire deployment. You can run multiple agents to distribute assignments and to provide agent failover.


Beginning with Monitoring Agent version 5.0.0, Cloud Manager Premium uses 10-second granularity for monitoring metrics. See Monitoring Metrics Per Cloud Manager Plan.

This tutorial guides you through the steps necessary to install or update the Monitoring Agent on your system.

See FAQ: Monitoring and Alerts for additional information.



You must configure the network infrastructure of your deployment so that:

  • the Monitoring Agent can connect to all mongod and mongos instances that you want to monitor.
  • the Monitoring Agent can connect to on port 443 (HTTPS).

Cloud Manager does not make any outbound connections to the agents or to MongoDB instances. If Exposed DB Host Check is enabled, Cloud Manager will attempt to connect to your servers occasionally as part of a vulnerability check.

Ensure all mongod and mongos instances are not accessible to hosts outside your deployment.

Multiple Monitoring Agents

You can run multiple Monitoring Agents to distribute monitoring assignments and provide failover. Cloud Manager distributes monitoring assignments among up to 100 running agents. Each agent monitors a different set of MongoDB processes. One Monitoring Agent per project is the primary agent. The primary agent reports the cluster’s status to Cloud Manager. As agents are added or shut down, Cloud Manager redistributes assignments. If the primary agent fails, Cloud Manager assigns another agent to be the primary agent.


To distribute monitoring assignments among multiple Monitoring Agents, you must use Monitoring Agent version 5.0.0 or higher.

If you run more than 100 Monitoring Agents, the additional agents run as standby agents. A standby agent is completely idle, except to log its status as a standby and periodically ask Cloud Manager if it should begin monitoring.

For versions of the Monitoring Agent earlier than version 5.0.0, only one agent handles monitoring assignments. All other running agents are standby agents.

If you install multiple Monitoring Agents, ensure that all the Monitoring Agents can reach all the mongod processes in the deployment.

To install multiple agents, simply repeat the installation process.

Collection Interval

If a Monitoring Agent is abruptly stopped without using the Cloud Manager interface, Cloud Manager will wait 5 minutes before redistributing that agent’s monitoring assignments, which means there can be up to a five-minute delay before another Monitoring Agent begins collecting data and sending pings to Cloud Manager. During this interval, the restarted Monitoring Agent will not collect data.


Automation Agent

The Automation Agent must be running on the server where you want to deploy the Monitoring Agent. To install the Automation Agent, see Automation Agent.


To install the agent, click Deployment, then Servers, then click a server’s ellipsis icon () and select Install Monitoring Agent.

To update the agent, click the link Cloud Manager provides when your agent is out-of-date. When the agent needs updating, Cloud Manager displays a warning on the Deployment page and provides a link to perform the update.