On this page本页内容
Enterprise Feature
SNMP is only available in MongoDB Enterprise.
MongoDB Enterprise on macOS does not include support for SNMP due to SERVER-29352.
MongoDB Enterprise can provide database metrics via SNMP, in support of centralized data collection and aggregation. This document identifies common problems you may encounter when deploying MongoDB Enterprise with SNMP as well as possible solutions for these issues.
See Monitor MongoDB With SNMP on Linux and Monitor MongoDB Windows with SNMP for complete installation instructions.
If you receive the following error message when trying to monitor with SNMP:
Ensure that you have not disabled SNMP access to mongod.
By default, SNMP access to mongod instances is enabled. Starting in MongoDB 4.0.6, you can disable SNMP access using either command-line option --snmp-disabled or the configuration file option snmp.disabled.
The following in the mongod logfile:
AgentX is the SNMP agent extensibility protocol defined in Internet RFC 2741. It explains how to define additional data to monitor over SNMP. When MongoDB fails to connect to the agentx master agent, use the following procedure to ensure that the SNMP subagent can connect properly to the SNMP master.
mongod has appropriate permissions to open a UNIX domain socket.One of the following errors at the command line:
mongod binaries that are not part of the Enterprise Edition produce this error. Install the Enterprise Edition and attempt to start mongod again.
Other MongoDB binaries, including mongos will produce this error if you attempt to start them with  snmp-master or snmp-subagent. Only mongod supports SNMP.
MongoDB Enterprise on macOS does not include support for SNMP due to SERVER-29352.
SNMPAgent¶The following line in the log file indicates that mongod cannot read the mongod.conf file:
If running on Linux, ensure mongod.conf exists in the /etc/snmp directory, and ensure that the mongod UNIX user has permission to read the mongod.conf file.
If running on Windows, ensure mongod.conf exists in C:\snmp\etc\config.