- On Prem MMS Monitoring >
- Getting Started with On Prem MMS Monitoring >
- Install Monitoring Agent >
- Install the Monitoring Agent on Windows
Install the Monitoring Agent on Windows¶
On this page
Overview¶
Installing the MMS monitoring agent on Windows requires a number of Python packages and extensions including C extensions, as well as PowerShell.
Prerequisites¶
Requirements¶
Before you install the monitoring agent, these software packages must be available or installed on the target system:
- PowerShell 2.0+
- Python 2.7
pymongo
to install the Python driver used by the monitoring agentagent.py
to install the MongoDB monitoring agent
See the Python Download Page for the most up to date Python distribution downloads, or use the direct link for the Python 2.7 64-bit Windows Installer .msi file.
If you do not have a 2.x-series Python installation on your system, install the latest version of Python 2.7.x. If your system supports 64-bit executable, use the 64-bit version.
Ensure that you install the correct PyMongo build for your Python installation both in terms of version number (e.g .2.6, 2.7, etc.) and system architecture (e.g. 32 or 64-bit.)
Credentials¶
If you already have jira account you may sign in to MMS with your JIRA credentials. When you sign into MMS for the first time, the system prompts you to create a new “group” for your deployment.
If you have not downloaded the Monitoring agent already, you can click the “Settings” link immediately after you sign into MMS, select “Settings” and then click on “MMS Agent” to download an agent specifically configured for your account.
Considerations¶
The Monitoring agent distribution download includes a WINDOWS.txt
file with
instructions for using the agent on Windows platforms. Before you can use the
agent on Windows platforms, you must ensure your system meets the system
requirements.
System Resources¶
The Monitoring agent does have some resource requirements and should run on
separate systems to avoid impacting mongod
and mongos
performance. To
monitor five or fewer nodes, you can safely deploy on an AWS “micro instance.”
Similarly, if you are only monitoring a small number of databases, you may be
able to deploy the agent on the system running the mongos
process. Running
PyMongo with the native extensions, which requires gcc
, provides significant
performance improvements.
Permissions¶
Installing the monitoring agent on Windows requires the appropriate permissions
to enable unsigned script execution with PowerShell. As described below,
permissions must be set at the HKEY_LOCAL_MACHINE level or HKEY_CURRENT_USER
level. In some cases, your system administrator may have used Group Policy to
block unsigned PowerShell scripts; contact your administrator if the
Set-ExecutionPolicy
commands below generate errors.
Procedure¶
Install PyMongo¶
Use the Windows installer to install PyMongo from PyPi.
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.
Enable Script Execution in PowerShell¶
Right click the PowerShell icon in the “Start Menu,” and run PowerShell as administrator. Issue the following command:
This returns the current execution policy. Save this value for future use in
Step 4 below. If the policy is “Unrestricted
” you can proceed to the next
step. If the policy is not “Unrestricted
” issue the following command:
If this command returns an error denying access to a HKEY_LOCAL_MACHINE
registry key, this command sets the execution policy scope to the current
local user (e.g. HKEY_CURRENT_USER
), not globally for the local machine:
Confirm the policy change when prompted.
Install the MMS Monitoring Agent¶
Start an administrator command window. Change to the folder containing the
Monitoring agent files. Run mongommsinstall.bat
. If this succeeds, the
Monitoring agent will be running and will start on system boot.
Download the Python 2.7 64-bit Windows Installer from the following URL:
Now you can start and stop the Windows service to control the MMS agent.
Consult the WINDOWS.txt
file for more information.
Disable Script Execution in PowerShell¶
If you have changed the execution policy, after the installation has completed successfully set it back to its original value using the following command:
Replace <original value>
with the value that you recorded above in Step 2.
Next Steps¶
Once the agent is running and configured, the next step is to deploy the monitoring agent in production.
Also, consider reading the PyMongo documentation.