Navigation

Install or Update the Monitoring Agent through Automation

The Ops 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 Ops Manager, which processes and renders this data. The agent initiates all connections between the agent and Ops Manager, and communications between the agent and Ops 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.

This tutorial guides you through the steps necessary to install or update the Monitoring Agent on your system. You must install the Ops Manager itself before installing the Monitoring Agent.

See Monitoring FAQs for additional information.

Considerations

Connectivity

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 Ops Manager on port 8080 if it is using HTTP or 8443 if it is using HTTPS.

Ops Manager does not make any outbound connections to the agents or to MongoDB instances. If Exposed DB Host Check is enabled, Ops 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. Ops Manager distributes monitoring assignments among up to 100 running agents. Each agent monitors a different set of MongoDB processes. One Monitoring Agent per group is the primary agent. The primary agent reports the cluster’s status to Ops Manager. As agents are added or shut down, Ops Manager redistributes assignments. If the primary agent fails, Ops Manager assigns another agent to be the primary agent.

Important

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

To tune the frequency at which standby agents check to see if they should begin monitoring and the interval Ops Manager uses to determine if a standby agent should start monitoring, see Monitoring Agent Session Failover.

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 Ops Manager interface, Ops 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 Ops Manager. During this interval, the restarted Monitoring Agent will not collect data.

Prerequisite

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.

Procedure

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 Ops Manager provides when your agent is out-of-date. When the agent needs updating, Ops Manager displays a warning on the Deployment page and provides a link to perform the update.