Installing the MMS monitoring agent on Debian and Ubuntu requires a number of Python packages and extensions, including C extensions.
Before you install the monitoring agent, these software packages must be available or installed on the target system:
- Python 2.6+
- setuptools to install Python packages
- python-dev to install Python C extensions
- pip to install and uninstall PyMongo
- pymongo to install the Python driver used by the monitoring agent
- agent.py to install the MongoDB monitoring agent
Install Python Packages and Extensions
Install python-setuptools, which you will use to install the remaining Python dependencies.
sudo apt-get install python-setuptools
Install Python C Extensions
While the C extensions are not required for MMS Monitoring, they significantly improve performance. You must have a C compiler (e.g. gcc) and Python header files installed on your system. Type this command to install Python headers:
sudo apt-get install build-essential python-dev
Install and Upgrade PyMongo
If you have not installed pymongo, type this command to install the latest version:
sudo easy_install pymongo
To upgrade to the latest version of the driver, type this command:
sudo easy_install -U pymongo
For more information about PyMongo installation, see the Additional Information section below. If PyMongo was previously installed without C extensions, install PyMongo C extensions. If you are installing PyMongo and the Monitoring agent on systems that do not have C compilers, build PyMongo packages with PyMongo C extensions.
Install the MongoDB Monitoring Agent
Download the latest MMS monitoring agent from the MongoDB Management Service, located on the Settings page and the Monitoring Agent tab. With Python software requirements installed, install the MongoDB monitoring agent with these commands:
cd mms-agent nohup python agent.py > ./agent.log 2>&1 &
Replace LOG-DIRECTORY with the path to your MongoDB logs.