MongoDB Management Suite Manual

MongoDB Management Suite Manual
Release 1.1
MongoDB, Inc.
June 23, 2015
Contents
1
On Prem MMS Monitoring
1.1 On Prem MMS Monitoring Overview . . . . . . . . . . . . . . . . . .
How On Prem MMS Monitoring works . . . . . . . . . . . . . . . . .
Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Getting Started with On Prem MMS Monitoring . . . . . . . . . . . . .
On Prem MMS Monitoring Setup Tutorials . . . . . . . . . . . . . . .
Monitoring Hosts with On Prem MMS Monitoring . . . . . . . . . . .
Configuring On Prem MMS Monitoring . . . . . . . . . . . . . . . . .
Updating the Monitoring Agent . . . . . . . . . . . . . . . . . . . . . .
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 Using the MMS Console . . . . . . . . . . . . . . . . . . . . . . . . .
Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
User and Environment Management . . . . . . . . . . . . . . . . . . .
Dashboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Host Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4 Frequently Asked Questions: On Prem MMS Monitoring . . . . . . . .
How do I add a new host or server? . . . . . . . . . . . . . . . . . . . .
How do I download the preconfigured agent? . . . . . . . . . . . . . .
How do I setup and configure the agent? . . . . . . . . . . . . . . . . .
Should I run more than one agent? . . . . . . . . . . . . . . . . . . . .
How does MMS gather database statistics? . . . . . . . . . . . . . . . .
Can I run the Monitoring agent on an AWS micro instances? . . . . . .
Can I monitor Kerberos-enabled nodes? . . . . . . . . . . . . . . . . .
What are all those vertical bars in my charts? . . . . . . . . . . . . . .
Why is my hostname displayed in orange? . . . . . . . . . . . . . . . .
Why is my Monitoring agent highlighted in red on the Agents tab? . . .
What is “Exposed DB Host Check,” and why did MMS send me
Databases!!!” Email? . . . . . . . . . . . . . . . . . . . . . . .
Why can’t the Monitoring agent connect to my host? . . . . . . . . . .
How do I modify my alert settings? . . . . . . . . . . . . . . . . . . . .
How do I reset my password? . . . . . . . . . . . . . . . . . . . . . . .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
. .
an
. .
. .
. .
. .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
“MMS
. . . .
. . . .
. . . .
. . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
Found Exposed
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
2
2
2
3
3
3
3
16
17
19
20
21
22
24
24
27
28
29
31
33
33
33
33
33
33
33
34
34
34
34
34
34
34
35
35
1.5
How do I change my password? . . . . . . . . . . .
How do I add a user to my company/group? . . . . .
What open source projects are you using? . . . . . .
On Prem MMS Monitoring Reference . . . . . . . .
Host Types . . . . . . . . . . . . . . . . . . . . . .
Host Process Types . . . . . . . . . . . . . . . . . .
Event Types . . . . . . . . . . . . . . . . . . . . . .
Alert Types . . . . . . . . . . . . . . . . . . . . . .
Chart Colors . . . . . . . . . . . . . . . . . . . . . .
Database Commands Used by the Monitoring Agent
PyMongo Error Codes . . . . . . . . . . . . . . . .
Browsers Supported by the MMS Console . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
35
35
35
35
35
36
36
36
37
38
38
38
1 On Prem MMS Monitoring
On Prem MMS Monitoring is a service for monitoring MongoDB deployments, as an inteegral part of the On-Prem
MongoDB Management Service. On Prem MMS Monitoring collects statistics on all key server and hardware indicators and presents this data through an intuitive web interface.
This manual describes the installation of the On Prem MMS Monitoring server component, the Monitoring agent, and
operation of the On Prem MMS Monitoring web console. You can find answers to common questions in the FAQs,
but for all other inquiries please feel free to open a JIRA ticket.
As
an
alternative,
you
may
consider
the
full
installation
http://docs.opsmanager.mongodb.com//monitoring/tutorial.
instructions
in
the
1.1 On Prem MMS Monitoring Overview
On Prem MMS Monitoring is an integral part of the On-Prem MongoDB Management Service (MMS). Designed
for security and ease of use, MMS collects statistics on all key server and hardware indicators and then presents the
data in a powerful web console. The data is a great asset when optimizing applications during development and
potentially invaluable when diagnosing production issues. For sharded clusters consisting of dozens of nodes, On
Prem MMS Monitoring is particularly useful because it provides a holistic overview of MongoDB deployments so
that administrators can quickly asses the health of their clusters.
How On Prem MMS Monitoring works
You enable On Prem MMS Monitoring by installing the lightweight Monitoring agent in the server environment. A
single agent can monitor an entire deployment of mongod and mongos instances. The agent extracts the data that
you provide to On Prem MMS Monitoring and automatically discovers MongoDB instances in your deployment using
this “seed” information. The agent then regularly pushes data to On Prem MMS Monitoring, which it uses to provide
reports on metrics that include memory usage, ops per second, and open connections. If enabled, On Prem MMS
Monitoring can also track system performance, including CPU load and I/O activity. The MMS web console then
displays the status of each MongoDB instance, as well as historical graphs for all collected data. You can create
custom dashboards, perform side-by-side data comparisons, and re-plot charts on different timescales to aid analysis.
2
Security
The agent transmits all metrics to the MMS servers over SSL (128-bit encryption), and agent traffic is exclusively
outbound. The Monitoring agent is a Python script, and you are free to examine its source code. MMS pushes no
data to the agent. The agent is subject to firewalls and contains support for MongoDB authentication. Monitored
services are only discovered when the agent fetches information provided to MMS or from other members of the
cluster. By default, the agent only records server metrics: the collection of hardware and application data must be
explicitly enabled. The web interface is secured over SSL, and extensive data access controls and audits are in place
to ensure the the safety of your data.
Installation
On Prem MMS Monitoring is compatible with all varieties of MongoDB deployments, regardless of the infrastructure or architecture of the MongoDB deployment. The agent and server installation are quick and straightforward,
meaningful results are available through the web interface in minutes. See the Getting Started with On Prem MMS
Monitoring document and your On Prem MMS Monitoring instance for more information.
1.2 Getting Started with On Prem MMS Monitoring
Installing and configuring On Prem MMS Monitoring quick and easy.
This manual will explain how to install and configure your On-Prem MongoDB Management Service server, and guide
you through the On Prem MMS Monitoring installation process specific to your operating system. Other pages will
help you to customize your configuration, keep the Monitoring agent updated, and provide you with troubleshooting
strategies.
As an alternative,
you may follow the install process from
http://docs.opsmanager.mongodb.com//monitoring/tutorial.
start
to
finish
in
the
On Prem MMS Monitoring Setup Tutorials
The following tutorials will guide you through the steps necessary to install and deploy On Prem MMS Monitoring on
your system. You will need to install and configure the On-Prem Monitoring server itself, and then install and start the
Monitoring agent.
As an alternative,
you may follow the install process from
http://docs.opsmanager.mongodb.com//monitoring/tutorial.
start
to
finish
in
the
class hidden
Install the On-Prem Monitoring Server
Requirements
Hardware To run the On-Prem Monitoring server, you must use a 64-bit server, with requirements according
to the following table:
Number of Monitored Hosts
Up to 400 monitored hosts
Up to 2000 monitored hosts
More than 2000 hosts
CPU Cores
4+
8+
Contact MMS
RAM
15 GB
15 GB
Storage Capacity
200 GB
500 GB
Storage IOPS/s
500
10000+ (SSD)
3
For reference: an AWS EC2 Standard Extra Large (i.e. m1.xlarge) with a provisioned 500 IOP/s EBS volume
supported the 400-host configuration above. An AWS EC2 High I/O Quadruple Extra Large (hi1.4xlarge)
supported the 2000 host configuration above.
For the best results, On-Prem MMS instances require SSD-backed storage.
Software On Prem MMS Monitoring has the following required dependencies:
•64-bit Linux. On-Prem MMS servers must run any of the following distributions:
–CentOS 5 or later,
–Red Hat Enterprise Linux 5, or later, or
–Amazon Linux AMI (latest version only,)
•MongoDB 2.2.0 or later.
•SMTP server or other email integration option.
While many Linux server-oriented distributions include a local SMTP server by default (e.g. Postfix, Exim,
Sendmail,) you may also configure On Prem MMS Monitoring to send mail via 3rd party providers including
Gmail and Sendgrid.
On Prem MMS Monitoring requires email for fundamental server functionality such as password reset and
alerts.
On Prem MMS Monitoring has the following optional dependencies.
•A Twilio API account for SMS alerting integration.
•A Graphite hostname / port for charting the MMS server’s internal health.
•An SNMP trap receiver for periodic heartbeat traps about MMS server’s internal health.
Installation Process
Overview At a high level, a basic installation will look like the following. The estimated setup time is less
than an hour.
1.Install a standalone local MongoDB server backed by a fast, large storage volume.
2.Install an SMTP email server as appropriate for your environment.
3.Install the MMS server RPM package.
4.Configure the MMS server’s URL and email addresses.
5.Start up MMS server.
Prepare Server
1.For AWS users, prepare MongoDB Storage:
If you are not using AWS, skip this step and continue to the next step.
If using an AWS EBS volume for MongoDB storage, create and attach the volume to your EC2 instance.
Once the volume is successfully attached, issue the following command to determine the name of the new
EBS volume:
sudo fdisk -l
4
Create a filesystem on this volume using the name you found in the previous, command, using the following form:
sudo mkfs -t ext4 /dev/xvd<letter>
Replace <letter> with the identifier for the volume, as in the following example:
sudo mkfs -t ext4 /dev/xvdf
You only need to create a filesystem the first time you initiate the drive.
Create a directory to use as the mount point:
sudo mkdir /mnt/ebs-mount-dir
Mount the volume with a command that resembles the following:
sudo mount /dev/xvd<letter> /mnt/ebs-mount-dir
Replace <letter> with the identifier for the volume, as in the following example:
sudo mount /dev/xvdf /mnt/ebs-mount-dir
2.Set Linux Kernel parameters. All users must complete this step to ensure optimal performance. Begin by
using the following commands to change the parameters of running instance:
sudo /sbin/sysctl -w net.core.netdev_max_backlog=30000
sudo /sbin/sysctl -w net.core.wmem_max=16777216
sudo /sbin/sysctl -w net.core.rmem_max=16777216
Edit the /etc/sysctl.conf file and append the lines below to ensure that these parameters are always
applied following a system reboot:
net.core.netdev_max_backlog = 30000
net.core.wmem_max = 16777216
net.core.rmem_max = 16777216
Install and Start MongoDB This section assumes you’re installing MongoDB on an instance running Red
Hat, CentOS, Fedora, or Amazon Linux: Use the Install Mongodb on Red Hat, CentOS, or Fedora Linux tutorial
for more information.
1.Add MongoDB repositories to the system’s package management tool.
Create the /etc/yum.repos.d/mongodb.repo file and add the following information about the
repository:
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
2.Install the MongoDB packages using the following operations:
sudo yum install mongo-10gen mongo-10gen-server
3.Configure data and logging directories for MongoDB.
Create directories for MongoDB’s log and data. This example assumes that the path for all MongoDB data
is beneath http://docs.opsmanager.mongodb.com//mnt/ebs-mnt-dir/mongo/. Use
the following commands:
5
sudo mkdir -p /mnt/ebs-mount-dir/mongo/data
sudo mkdir -p /mnt/ebs-mount-dir/mongo/logs
Issue the following command to ensure that the mongod process owns all paths below the
http://docs.opsmanager.mongodb.com//mnt/ebs-mnt-dir/mongo/ path:
sudo chown -R mongod:mongod /mnt/ebs-mount-dir/mongo
Edit the /etc/mongod.conf to include the following settings:
logpath=/mnt/ebs-mount-dir/mongo/logs/mongod.log
dbpath=/mnt/ebs-mount-dir/mongo/data
This will configure the paths for the log and data directories. Adjust the paths as needed.
4.Start MongoDB.
Issue the following command:
sudo /etc/init.d/mongod start
Note: If using EBS, starting MongoDB may take several minutes to pre-allocate the journal files. This is
normal behavior.
Obtain and Install On-Prem MMS Server
Note: Contact a MongoDB representative to obtain the current stable On Prem MMS Monitoring release.
MMS is available in RPM, tar.gz, and zip packages.
You
can
also
download
the
latest
On-Prem
Monitoring
<http://www.mongodb.com/commercialsupport/downloads> as an RPM package.
releases
from
RPM Install Install the RPM by issuing command in the following form:
sudo rpm -ivh 10gen-mms-<version>.x86_64.rpm
Replace <version> with the version of the .rpm you obtained. When installed, the base directory for the
MMS software is /opt/10gen/mms/. The RPM will also create a new system user 10gen-mms under
which the server will run.
tar.gz and zip Install You can install On Prem MMS Monitoring from the provided tar.gz or zip
archive without making any changes to the underlying system (i.e. without creating users.) To install, extract
the package, as in the following command:
tar -zxf 10gen-mms-<version>.x86_64.tar.gz
Optionally create a symlink in /etc/init.d to the included control script for convenience, as in the following:
sudo ln -s <install_dir>/bin/10gen-mms /etc/init.d/
Configure On-Prem MMS Server This section describes the required configuration for the On-Prem MMS
Server. See Advanced Configuration for more configuration information.
6
Required Configuration
Note: By default, On Prem MMS Monitoring will use a local SMTP server listening on port 25.
Configure MMS properties, by editing the <install_dir>/conf/conf-mms.properties file. Edit
the following properties according to the needs of your deployment, as in the following example:
mms.centralUrl=http://mms.example.com:8080
mms.fromEmailAddr=MMS Alerts <mms-alerts@example.com>
mms.replyToEmailAddr=mms-no-reply@example.com
mms.adminFromEmailAddr=MMS Admin <mms-admin@example.com>
mms.adminEmailAddr=mms-admin@example.com
mms.bounceEmailAddr=bounce@example.com
These properties are blank initially, and you must define them before the On Prem MMS Monitoring instance
will start.
Configure Email Authentication Please refer to your SMTP provider’s documentation for the appropriate
settings or for how to configure a local SMTP server as a relay. You may configure authentication if you want
to send mail using existing email infrastructure (i.e. SMTP,) or a service such as Gmail or Sendgrid .
Set the following value in the <install_dir>/conf/conf-mms.properties file:
mms.emailDaoClass=com.xgen.svc.mms.dao.email.JavaEmailDao
Then, to the same file, set the following values as defined by your provider. Defaults specified inline:
mms.mail.transport=<smtp/smtps> # (defaults to smtp)
mms.mail.hostname=<mail.example.com> # (defaults to localhost)
mms.mail.port=<number> # (defaults to 25)
mms.mail.tls=<true/false> # (defaults to false)
The following two values are optional, and unless set default to disabled authentication:
mms.mail.username=
mms.mail.password=
Optional:
AWS Simple Email Service Configuration Set the following value in
<install_dir>/conf/conf-mms.properties to configure integration with AWS’s Simple Email
Service (SES:)
mms.emailDaoClass=com.xgen.svc.mms.dao.email.AwsEmailDao
To configure this integration you must also provide your AWS account credentials in the following two properties:
aws.accesskey=
aws.secretkey=
Start and Stop the On-Prem MMS Server After configuring your On Prem MMS Monitoring deployment,
you can start the MMS server with the following command. 1
sudo /etc/init.d/10gen-mms start
1 If you installed from a tar.gz or zip archive, you must create a symlink located at the path /etc/init.d/10gen-mms that points to
the <install_dir>/bin/10gen-mms.
7
The On-Prem MMS server logs its output to a logs directory inside the installation directory. You can view
this log information with the following command:
sudo less <install_dir>/logs/mms0.log
If the server starts successfully, you will see content in this file that resembles the following:
[main]
[main]
[null]
[main]
[main]
[main]
[main]
[main]
[main]
INFO ServerMain:202 - Starting mms...
WARN AbstractConnector:294 - Acceptors should be <=2*availableProcessors: SelectChannelC
LoginService=HashLoginService identityService=org.eclipse.jetty.security.DefaultIdentityS
INFO AppConfig:46 - Starting app for env: hosted
INFO MmsAppConfig:67 - Not loading backup components
INFO GraphiteSvcImpl:67 - Graphite service not configured, events will be ignored.
INFO TwilioSvcImpl:48 - Twilio service not configured, SMS events will be ignored.
INFO OpenDMKSnmpTrapAgentSvcImpl:91 - SNMP heartbeats hosts not configured, no heartbeat
INFO ServerMain:266 - Started mms in: 24979 (ms)
You can now use the On Prem MMS Monitoring instance by visiting the URL specified in the
mms.centralUrl parameter (e.g. http://mms.example.com:8080) to continue configuration:
Unlike the SaaS version of MMS, On Prem MMS Monitoring stores user accounts in the local MongoDB
instance. When you sign into the On Prem MMS Monitoring instance for the first time, the system will prompt
you to register and create a new “group” for your deployment.
After completing the registration process, you will arrive at the “MMS Hosts,” page.
Because there are no Monitoring agents attached to your account, the first page you see in On Prem MMS
Monitoring will provide instructions for downloading the Monitoring agent. Click the “download agent” link
to download a pre-configured agent for your account. Continue reading this document for installation and
configuration instructions for the MMS agent.
Stopping the On-Prem MMS server is as follows:
sudo /etc/init.d/10gen-mms stop
Advanced Configuration
Change Port Number
1.Edit <install_dir>/conf/conf-mms.properties
mms.centralUrl=http://mms.acmewidgets.com:<newport>
2.Edit <install_dir>/conf/mms.conf
BASE_PORT=<newport>
3.Restart MMS server:
sudo <install_dir>/bin/10gen-mms restart
Run as Different User
1.Edit <install_dir>/conf/mms.conf:
MMS_USER=foo_user
2.Change Ownership of <install_dir> for new user:
8
sudo chown -R foo_user:foo_group <install_dir>
3.Restart MMS server:
sudo <install_dir>/bin/10gen-mms restart
Replication Configuration The backing MongoDB store uses a connection string URI defined in the
<install_dir>/conf/conf-mms.properties directory.
Edit conf-mms.properties to define the replication hosts or partition MMS’ databases onto separate machines.
For example:
mongo.mmsdbpings.mongoUri=mongodb://host1:40000,host2:40000,host3:40000/?maxPoolSize=100
mongo.mmsdbpings.replicaSet=pingsreplset
mongo.mmsdbqueues.mongoUri=mongodb://host1:50000,host2:50000,host3:50000/?maxPoolSize=50
mongo.mmsdbqueues.replicaSet=mmsdbqueuesreplset
Note: More information about connection string URI format available here
Authentication Configuration For standalone MongoDB nodes running with user authentication, simply add
the username and password credentials to the mongoUri, and specify the database as admin. For example:
mongo.mmsanalytics.mongoUri=mongodb://mongouser:mongopw@127.0.0.1:40000/admin?maxPoolSize=25
mongo.mmsanalytics.replicaSet=mmsanalyticsreplset
Unfortunately, this does require the plaintext credentials be in the clear, however following standard practice
you may reduce the permissions of the configuration file:
sudo chmod 600 <install_dir>/conf/conf-mms.properties
Optional: Configure a Required reCaptcha for user Registration To enable reCaptcha anti-spam test on
new user registration, you may sign up for a reCaptcha account and provide your API credentials in the following
two properties:
reCaptcha.public.key=
reCaptcha.private.key=
Optional: Configure Twilio SMS Alert Support To receive alert notifications via SMS, signup for a Twilio
account at http://www.twilio.com/docs/quickstart and enter your account ID, API token, and Twilio phone number into the following properties:
twilio.account.sid=
twilio.auth.token=
twilio.from.num=
Optional: Configure SNMP Heartbeat Support New in v1.1.0
The MIB file is available for download at: http://downloads.mongodb.com/on-prem-monitoring/MMS-10GENMIB.txt
You can configure the On-Prem MMS Server to send a periodic heartbeat trap notification (v2c) that contain an
internal health assessment of the MMS Server.
9
The MMS Server can send traps to one or more endpoints on the standard SNMP UDP port 162.
There are three configuration options that affect the heartbeat behavior:
# Listening UDP port for SNMP. (Note: Setting to less than 1024 will require running MMS server
snmp.listen.port=11611 #default
# Period in seconds between heartbeat notifications
snmp.default.heartbeat.interval=300 #default
# Optional comma-separated list of hosts where 'heartbeat' traps will be sent on standard UDP po
# Leaving blank (the default) disables the SNMP heartbeat functionality
snmp.default.hosts=
Installing the Monitoring Agent on UNIX/Linux
Requirements and Prerequisites On Prem MMS Monitoring has a series of prerequisite requirements. The
following sections will guide you through the requirements and provide basic instructions for fulfilling them.
Basic On Prem MMS Monitoring Requirements
•Your MongoDB instances (i.e. mongod and mongos) must be version 1.6 or newer.
•You must have Python 2.4 or greater.
Note: The Monitoring agent does not provide support the PyPy implementation of Python, and
does not support the Python 3.x series of Python.
•You’ll need Python’s setuptools.
Most operating systems (i.e. distributions) package setuptools. For example, Debian and Ubuntu users can
use the following command to install the package:
sudo apt-get install python-setuptools
For Red Hat Enterprise Linux (RHEL) CentOS, or Fedora users, the the following command will install
the package:
sudo yum install python-setuptools
•If your system is running Python 2.4, you will need to install the following Python modules:
–hmac
–hashlib
Issue the following command:
sudo easy_install hmac hashlib
Note: The latest version of the Monitoring agent includes no other Python module dependencies. If
you’re installing version 1.4 of the agent (legacy) you will also need to install the simplejson module.
For users of Python 2.4, you will need to install simplejson version 2.1.0. Install this module with the
following command:
10
sudo easy_install simplejson==2.1.0
For users of Python 2.5, you will need to install the simplejson with the following command:
sudo easy_install simplejson
Do not use pip to install modules when using Python 2.4 or 2.5, as there are some compatibility issues.
Some users have reported problems installing hmac, if easy_install produces an error or you suspect
a problem with these libraries see instructions for installing hmac manually.
•All users must install PyMongo, the Python driver for MongoDB.
Use the latest possible version of PyMongo for the best possible speed and stability. The agent is not
compatible with versions of PyMongo before 1.9. For instructions for installing PyMongo, see Installing
PyMongo.
•If your datacenter requires that you proxy outbound connections through a gateway, you must use a version of Python greater than 2.6.1. Additionally, you will need export the “https_proxy” environment
variable (or “HTTPS_PROXY” on Windows). For more information, see “Working with Proxies”.
Consider the README file distributed with the agent for more information. When all dependencies are successfully installed, you may proceed to installing the agent.
Install Monitoring Agent Software 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 (i.e. <http://mms.mongodb.com>), and then select “MMS Agent” from the left-hand list to
download an agent specifically configured for your account.
You can run the agent on any system that can connect to the MongoDB instances you want to monitor. As long
as it can connect to each instance, you can use a single agent to do all the monitoring. Do be sure that the agent
can make outgoing connections via HTTPS on port 443.
Note: 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.
Unzip the archive and run the agent with the following command:
python agent.py
This starts two processes: a parent to monitor the agent daemon and perform automatic upgrades and a child
process to collect data.
Warning: If your MongoDB instance has thousands of databases or collections, you will want to disable
database statistics collection. See “Database and Collection statistics” for more information.
11
Automating Agent Deployments The agent you downloaded from the On-Prem MongoDB Management
Service site is automatically configured with the credentials for your account. You can download a configured
copy of the Monitoring agent by copying the link available in the “Group Settings” section of the “Settings” tab
of the MMS console. This link will resemble the following:
https://mms.mongodb.com/settings/mmsAgent/<hash>/10gen-mms-agent-<group-name>.zip
Alternately, you may automate Monitoring agent deployments using an unconfigured agent, and the API and
secret keys from the “API Key” and “Secret Key” sections of the settings page. The unconfigured agent is
available at the following URL:
https://mms.mongodb.com/settings/10gen-mms-agent.zip
Unzip this archive and edit the settings.py file.
Replace the strings “@API_KEY@” and
“@SECRET_KEY@” with the “API” and “Secret Keys” defined for your account. You can find these in the
“Settings” page of the MMS console.
You may embed this process in your existing deployment scripts to automatically install or redeploy new agents.
Next Steps Now that you have installed the Monitoring agent software, you can deploy the Monitoring agent
in production.
Installing the Monitoring Agent on Windows
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 (i.e. <http://mms.mongodb.com>), select “Settings” and then click on “MMS Agent” to
download an agent specifically configured for your account.
Install Agent Software 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.
The following tutorial will ensure you have installed all required packages.
1.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.
2.Use the Windows installer to install PyMongo from PyPi. 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.)
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
3.If you do not have Windows PowerShell version 2.0 to install, install it now. PowerShell is available as
part of the Windows Management Framework.
Check your installed version of PowerShell by starting a PowerShell command window and issuing the
following command:
Get-Host
Install the correct version if your version number is lower than 2.0.
12
4.Enable script execution in PowerShell. After installing the correct version, right click the PowerShell icon
in the “Start Menu,” and run PowerShell as administrator. Issue the following command:
Get-ExecutionPolicy
This returns the current execution policy. Save this value for future use. If the policy is “Unrestricted”
you can proceed to the next step. If the policy is not “Unrestricted” issue the following command:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Confirm the policy change when prompted.
5.Start an administrator command window. Change to the folder containing the MMS agent files. Run
mongommsinstall.bat. If this succeeds, the MMS agent will be running and will start on system
boot.
Now you can start and stop the Windows service to control the MMS agent. Consult the WINDOWS.txt file
for more information.
If you have changed the execution policy, after the installation has completed successfully set it back to its
original value using the following command:
Set-ExecutionPolicy -ExecutionPolicy <original value>
Replace “<original value>” with the value that you recorded above.
Next Steps Now that you have properly configured your machines and installed the Monitoring agent software,
you can deploy the Monitoring agent in production.
Installing PyMongo
Easy Installation While the C extensions are not required for On Prem MMS Monitoring, they significantly
improve performance. To install these extensions, make sure you have a C compiler (e.g. gcc) and Python
header files installed on your system. Debian and Ubuntu users should issue the following command:
sudo apt-get install build-essential python-dev
Red Hat, CentOS, and Fedora Users should issue the following command:
sudo yum install gcc python-devel
If you have not installed pymongo issue the following command to install the latest version:
sudo easy_install pymongo
To upgrade to the latest version of the driver, use the following command:
sudo easy_install -U pymongo
For more information concerning PyMongo installation, see the PyMongo documentation.
Installing PyMongo C Extensions If you installed PyMongo with the C extensions (i.e. on a system with a
C compiler, or using the Windows installer) then you can disregard this section. Otherwise use the following
procedure to reinstall your agent with C extensions.
1.Install gcc, a C compiler, and the necessary development packages:
Debian and Ubuntu users should issue the following command:
13
sudo apt-get install build-essential python-dev
Red Hat, CentOS, and Fedora Users should issue the following command:
sudo yum install gcc python-devel
2.Install the pip utility so that you can uninstall the existing instance of PyMongo, by issuing the following
command:
sudo easy_install pip
3.Remove the existing copy of PyMongo with the following command:
sudo pip uninstall pymongo
4.Now re-install PyMongo with the following command:
sudo pip install pymongo
After upgrading PyMongo, you will need to restart your Monitoring agent to receive the full effect of the
improvement.
Note: When you restart your agent there is a 5 minute timeout before the agent will begin sending data to MMS
again.
Build PyMongo Packages with PyMongo C Extensions If you are installing PyMongo and the Monitoring
agent on systems that do not have C compilers, you can create a .egg package of PyMongo with C extensions
to install on your system or systems.
Note: The packages distributed in PyPI for Windows include C extensions.
First, on a system that has a C-compiler, download the PyMongo source. Always download the source for the
latest version of the driver, which you can find at the PyMongo page on PyPi.
The following example uses version 2.1.1. Issue the following command:
curl http://pypi.python.org/packages/source/p/pymongo/pymongo-2.1.1.tar.gz > pymongo-2.1.1.tar.g
Note: To install a C-compiler (i.e. gcc) and the necessary dependencies, Debian and Ubuntu users should
issue the following command:
sudo apt-get install build-essential python-dev
Red Hat, CentOS, and Fedora Users should issue the following command:
sudo yum install gcc python-devel
Extract the driver as follows:
tar -zxvf pymongo-2.1.1.tar.gz
Change directories and build the .egg package with the following sequence:
cd pymongo-2.1.1
python setup.py bdist_egg
14
You can find .egg file in the dist/ sub-directory.
The file name will resemble
“pymongo-2.1.1-py2.7-linux-x86_64.egg” but may have a different name depending on
your platform and the version of python you use to compile.
Warning: These “binary distributions,” will only work on systems that resemble the environment on which
you built the package. In other words, ensure that operating systems and versions of Python and architecture
(i.e. “32” or “64” bit) match.
Copy this file to the target system and issue the following command to install the package (with root or “sudo”
privileges:)
easy_install pymongo-2.1.1-py2.7-linux-x86_64.egg
Deploying the Monitoring Agent in Production
Daemonizing the Process For production deployments of On Prem MMS Monitoring, you will want to daemonize the process and ensure that it restarts following a system restart. Your operating system likely has a
preferred method for managing daemon processes.
As a temporary measure, the following command will start the agent process detached from the current terminal
session:
nohup python agent.py > /[LOG-DIRECTORY]/agent.log 2>&1 &
Replace “[LOG-DIRECTORY] with the path to your MongoDB logs.
This command allows the agent survive the current terminal session and writes all messages to the agent.log
file. You may include this command in your MongoDB control script or use your system’s /etc/rc.local
equivalent; however, avoid running the agent as root.
Control Scripts If you need to create an initialization script to control the daemonized process, consider the
following resources:
•Ubuntu Boot Up How To
•Debian Linux Control/Init Scripts
•Arch Linux rc.d Scripts
•Debian and Ubuntu Systems have an example control script located at /etc/init.d/skeleton that
you can use as a template.
•Red Hat Enterprise Linux and related distributions (e.g. Fedora, CentOS, etc.) provide example control
scripts in the /usr/share/doc/initscripts-*/sysvinitfiles/ directory.
You may also examine the scripts in your system’s /etc/init.d/ or /etc/rc.d/ directory. Ensure that
the agent does not run with root privileges.
Use the update-rc.d utility on Debian and Ubuntu and the chkconfig tool on Red Hat related systems to
add these scripts to the initialization process. Be sure to test the control script configuration. It is essential that
you be able to start, stop, and restart the agent following a system reboot.
Working with Proxies If your datacenter requires that you route outbound https connections via a proxy,
export the “https_proxy” environment variable (or “HTTPS_PROXY” on Windows.) Issue the following
command before running the Monitoring agent:
15
export https_proxy='http://proxyserver.example.net:port"
Replace “http://proxyserver.example.net” with the name or IP address of the proxy server and
“port with the TCP port that the proxy service runs on. You may choose to export this variable inside of your
control script.
Next Steps Once the agent is running and configured to your satisfaction, you can begin configuring |monitoring| for your deployment or start using the console.
Monitoring Hosts with On Prem MMS Monitoring
Note: On Prem MMS Monitoring does not currently support monitoring for Kerberos-enabled nodes.
The Monitoring agent automatically discovers MongoDB processes based on existing cluster configuration. You’ll
have to manually “seed” at least one of these hosts from the MMS console.
To add a host to On Prem MMS Monitoring, click the “plus” (+ ADD HOST) button at the top of the Hosts page.
This raises a query element for the hostname, port, and optionally an admin DB username and password. Provide the
necessary information and select “Add.”
Once it has a seed host, the Monitoring agent will discover any other nodes from associated clusters. These clusters,
and their respective seed hosts, include:
• Master databases, after adding slave databases.
• Shard clusters, after adding mongos instances.
• Replica sets, after adding any member of the set.
Once you add these seed nodes, the Monitoring agent will fetch this information from the MMS servers. Thus,
when configuring the monitoring environment, you may need to wait for several update cycles (e.g. 5-10 minutes) to
complete the auto-discovery process and host identification. During this period, you may see duplicate hosts in the
MMS web console. This is normal.
The Monitoring agent fetches configuration and reports to On Prem MMS Monitoring every minute, so, again, there
may be a delay of several minutes before data and host information propagate to the MMS console.
You can find immediate evidence of a working installation in the agent output or logs. For more information, check
the MMS console’s “Hosts,” section in the “Agent Log” and “Pings” tabs. Once On Prem MMS Monitoring has data,
you can view and begin using the statistics.
If the agent cannot collect information about a host for 24 hours, the On Prem MMS Monitoring system deactivates
the instance in the MMS agent and console. Deactivated hosts must be manually reactivated from the MMS console if
you wish to collect data from these hosts.
Monitoring Architecture
Only one Monitoring agent per group or environment will report to On Prem MMS Monitoring at a time. However,
you can run multiple instances of the agent to provide redundancy. Secondary agents act as hot standbys. If you stop
the agent process, On Prem MMS Monitoring removes the agent from the “Agents” tab within a day. If a Monitoring
agent is unavailable, the last ping times for that agent do not update. To install secondary agents, simply repeat the
installation process in the installation guide for each new agent. You can also automate agent installation.
Note: When the Monitoring agent restarts, there is a five minute delay before that agent begins collecting data sending
pings to On Prem MMS Monitoring. If you have multiple agents, this delay permits other agents in your infrastructure
to become the “primary agent” and for On Prem MMS Monitoring to determine which agent will be primary.
16
During this interval, the restarted Monitoring agent will not collect data.
Additional Considerations for MongoDB 2.4 Nodes
If you are monitoring a MongoDB 2.4 instance with authentication enabled, you must have elevated privileges to
collect complete performance data. At a minimum, the user will need to possess:
• the clusterAdmin role, and
• the readAnyDatabase role.
If MMS is running with DB Profiling enabled, the user requires additional permissions.
clusterAdmin and readAnyDatabase roles, the user must possess either:
In addition to the
• the dbAdminAnyDatabase role, or
• the dbAdmin role on the specific databases being profiled.
See also:
• User Privilege Roles in MongoDB.
Configuring On Prem MMS Monitoring
This document discusses specific configuration options for On Prem MMS Monitoring, including hardware monitoring
with Munin-Node and using On Prem MMS Monitoring with SSL.
Hardware Monitoring with Munin-Node
On Prem MMS Monitoring provides support for collecting and charting hardware statistics collected with Munin. You
must install the munin-node package on each the host system that you wish to monitor.
Note: munin-node, and hardware monitoring is only available for MongoDB instances running on Linux hosts.
On Debian and Ubuntu systems, issue the following command to install munin-node:
sudo apt-get install munin-node
To install munin-node on Red Hat, CentOS, and Fedora systems, issue the following command:
yum install munin-node
Note: For Red Hat and CentOS 6.8 systems, you will need to install the EPEL repository before installing
munin-node. To install the EPEL repository, issue the following command:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
When installation is complete, ensure that munin-node:
• is running. Use the command, “ps -ef | grep "munin"” to confirm. If the process is not running, issue
the command “/etc/init.d/munin-node start”.
• will start following the next system reboot. This is the default behavior on most Debian-based systems. Red Hat
and related distributions should use the “chkconfig” command, to configure this behavior (i.e. “chkconfig
munin-node on”)
17
• is accessible from the system running the agent. munin-node uses port 4949, which needs to be open on the
monitored system, so the agent can access this data source. Use the following procedure to test access:
telnet [HOSTNAME] 4949
fetch iostat
fetch iostat_ios
fetch cpu
Replace [HOSTNAME] with the hostname of the monitored system. Run these commands from the system
where the MMS Agent is running. If these “fetch” commands return data, then munin-node is running and
accessible by MMS agent.
Note: On some platforms, munin-node does not have all required plugins enabled.
For CentOS, the munin-node package does not have the iostat and iostat_ios plugins enabled. Use the
following operation to enable these plugins:
sudo ln -s /usr/share/munin/plugins/iostat /etc/munin/plugins/iostat
sudo ln -s /usr/share/munin/plugins/iostat_ios /etc/munin/plugins/iostat_ios
sudo /etc/init.d/munin-node restart
If munin-node is running but inaccessible, make sure that you have access granted for the system running the Monitoring agent and that no firewalls block the port between munin-node and the Monitoring agent. You may find the
munin-node configuration at “/etc/munin-node/munin-node.conf” or “/etc/munin-node.conf”,
depending on your distribution.
Additional considerations:
• If you have numbered disk devices (e.g.
/dev/sda1 and /dev/sda2) then you will need to
configure support for numbered disk in the munin iostat plugin.
Find the configuration file at
/etc/munin/plugin-conf.d/munin-node or a similar path, and add the following value:
[iostat]
env.SHOW_NUMBERED 1
• If you have Munin enabled and do not have iostat ios data in your Munin charts, your munin-node may
not have write access to required state files in its munin/plugin-state/ directory. See the munin-node
plugin log (i.e. /var/log/munin/munin-node.log or similar depending on your distribution) for more
information.
The full path of this state directory depends on the system,
but is typically
/var/lib/munin/plugin-state/. Run the following command sequence to correct this issue:
touch /var/lib/munin/plugin-state/iostat-ios.state
chown -R [username]:[group] /var/lib/munin/plugin-state/
chmod -R 660 /var/lib/munin/plugin-state/
Replace [username] and [group] with the username and group that the munin-node process runs with.
If you encounter any other problems, check the log files for munin-node to ensure that there are no errors with
Munin. munin-node writes logs files in the /var/log/ directory on the monitored system.
Using SSL with On Prem MMS Monitoring
On Prem MMS Monitoring can monitor MongoDB instances running with SSL. To use SSL with mongod and
mongos, you must enable it at compile time, or use one of the subscriber builds. MongoDB added SSL support
in version 2.0.
To monitor a host with SSL enabled, you can either:
18
1. Edit the settings.py file in your agent installation, so that the useSslForAllConnections value is
True, as follows:
useSslForAllConnections = True
Then restart the Monitoring agent. After restarting the agent you may observe a five minute delay before On
Prem MMS Monitoring receives data from the agent.
2. Enable support on a per-host basis in the MMS console by clicking on the edit (i.e. “Pencil”) button on the right
hand-side of the “Hosts” page. In the dialogue that pops up, click the check-box on the SSL tab.
If you enable SSL support globally you will not be able to override this setting on a per-host basis.
Next Steps with On Prem MMS Monitoring
Take this opportunity to explore the MMS interface. For a detailed explanation of the pages that form the MMS
console, continue to the usage guide. You may also want to consult the troubleshooting guide.
Updating the Monitoring Agent
Upgrading an RPM-Based Installation
Please contact MMS to receive the download location of the latest MMS server release.
1. Shutdown the On-Prem MMS server and take a backup of your existing configuration:
sudo /etc/init.d/10gen-mms stop
sudo cp -a <install_dir>/conf ~/mms_conf.backup
2. Perform an RPM upgrade:
sudo rpm -Uvh 10gen-mms-<version>.x86_64.rpm
3. Reconcile any changes in configuration files.
At this point the upgrade is complete. However you may need to reconcile changes in your configuration with
new configuration options available in the latest release.
During the rpm operation, if you saw the following output, you have changes to reconcile:
warning: <install_dir>/conf/conf-mms.properties created as
<install_dir>/conf/conf-mms.proper
Compare your current configuration to the updated version, with the following sequence of operations.:
diff -u <install_dir>/conf/conf-mms.properties <install_dir>/conf/conf-mms.properties.rpmnew
diff -u <install_dir>/conf/mms.conf <install_dir>/conf/mms.conf.rpmnew
Edit your configuration to resolve any conflicts between the old and new versions, being sure to take any new
changes from conf-mms.properties.rpmnew as appropriate. Changes to mms.centralUri, email
addresses, and MongoDB are the most common configuration changes.
Repeat the above reconciliation for mms.conf if the upgrade indicates a conflict.
Note: The upgrade from beta versions 1.0.1 to 1.0.2 changed several paths to make the MMS server completely
self contained. In 1.0.2 all logs, configuration, and working files are in the /opt/10gen/mms/ hierarchy. This
changes the following paths from 1.0.1:
• New logs path: <install_dir>/logs/
19
• New tmp path: <install_dir>/tmp/
Finally, you may also need to re-symlink your startup script:
sudo ln -s /<install_dir>/bin/10gen-mms /etc/init.d/10gen-mms
4. Restart the On-Prem MMS server.
sudo /etc/init.d/10gen-mms start
Upgrading a tgz/zip Installation
To upgrade a tarball installation, backup configuration and/or logs, and then re-install the On-Prem MMS server.
Important: It is crucial that you back up the existing configuration because the upgrade process will delete existing
data.
In more details:
1. Shutdown the MMS server and take a backup of your existing configuration and logs.
sudo /etc/init.d/10gen-mms stop
sudo cp -a <install_dir>/conf ~/mms_conf.backup
sudo cp -a <install_dir>/logs ~/mms_logs.backup
2. Remove your existing MMS server installation entirely and extract latest release in its place:
cd <install_dir>/../
sudo rm -rf <install_dir>
sudo tar -zxf -C . /path/to/10gen-mms-<version>.x86_64.tar.gz
3. Similar to the RPM upgrade path above, compare and reconcile any changes in configuration between versions:
diff -u ~/mms_conf.backup/conf-mms.properties <install_dir>/conf/conf-mms.properties
diff -u ~/mms_conf.backup/mms.conf <install_dir>/conf/mms.conf
4. Edit your configuration to resolve any conflicts between the old and new versions, being sure to take any new
changes as appropriate.
Note: Changes to mms.centralUri, email addresses, and MongoDB are the most common configuration
changes.
5. Restart the On-Prem MMS server.
sudo /etc/init.d/10gen-mms start
Troubleshooting
The document provide troubleshooting advice for common issues encountered installing the On Prem MMS Monitoring agent, and working with hmac. For answers to other questions, see the FAQ.
Troubleshooting: Monitoring Agent Installation
Consider the following issues if you encounter difficulty installing the Monitoring agent.
20
• Make sure that the system running the agent has pymongo installed. If your system runs a 2.4.x series Python,
verify the installation of other requirements.
• Ensure that the system running the agent can resolve and connect to the MongoDB instances. To confirm, log
into the system where the agent is running and issue a command in the following form:
mongo [hostname]:[port]
Replace [hostname] with the hostname and [port] with the port that the database is listening on.
• Verify that the Monitoring agent can connect on TCP port 443 (outbound) to the MMS server (i.e.
“mms.mongodb.com”.)
• Allow the agent to run for 5-10 minutes to allow host discovery and initial data collection.
• If your MongoDB instances run with authentication enabled, ensure that MMS has these credentials. You can
supply these credentials when adding a host by specifying credentials in the “Add Host Interface,” for every host
that has authentication enabled. You may also click on the “Edit” host button (i.e. the pencil) on the Hosts page
in the MMS console to provide credentials.
• If you continue to encounter problems, check the agent’s output or logs for errors.
Troubleshooting: hmac Installation
Note: This section addresses a potential issue for users running a version of Python in the 2.4-series. Users of later
Python versions do not require hmac.
If easy_install produces an error, or you see the following error in your agent logs, you will need to install the
hmac package manually:
AttributeError:'builtin_function_or_method' object has no attribute 'new'
To install the hmac package, begin by downloading the latest source package. The following example uses version
20101005. Issue the following command:
curl http://pypi.python.org/packages/source/h/hmac/hmac-20101005.tar.gz > hmac-20101005.tar.gz
Always download the latest version of hmac, which you can find at the hmac page on PyPi.
Extract the files from the archive with the following command:
tar -zxf hmac-20101005.tar.gz
Change directories, build and install the package with the following sequence:
cd hmac-20101005/
python setup.py install
You may need root (i.e. sudo) privileges to run the final install step.
1.3 Using the MMS Console
The MMS web console is at the center of the On-Prem MongoDB Management Service. Through it, you can access
all of your monitored objects, set up alerts, control users, adjust your settings, and, using On Prem MMS Monitoring
dashboards, create customized collections of charts for easier data analysis.
The best way to learn about On Prem MMS Monitoring‘s capabilities is to browse the interface with live data. If you
haven’t done so already, please install the Monitoring agent before proceeding.
21
For an in-depth description of the top-level pages that form the MMS web console, consider the following documents:
Hosts
The “Hosts” section is the primary location for monitoring information in the MMS console. This tabbed interface
provides access to all of your monitored objects. The tabs you see depend on the types of processes in your deployment.
The tab:
• “Hosts” displays all non-arbiter mongod instances.
• “Mongos” displays all mongos instances.
• “Configs” displays all database configuration servers.
• “Arbiters” lists the mongod processes functioning as arbiters in replica sets.
• “Agents” lists the MMS agents attached to this MMS account. For more information, see “Agents.”
The remaining “Host” section tabs contain information about the monitoring process and environment. The tab:
• “Agent Log” displays a log of the MMS agent’s activity.
• “Pings” provides access to the raw JSON document of the last 20 pings sent to MMS by the agent.
• “Host Aliases” shows the mapping between system hostnames and the names provided by the monitored process
(e.g. mongod and mongos.) In most cases, hosts are automatically aliased during auto-discovery. If needed,
you may modify and configure the alias mapping in the “Settings” section of the console in the “Preferred
Hostnames” section. For more information about creating host aliases, see “Creating Host Aliases”.
Note: When you add or update a “Preferred Hostname” value, this action resets all previous hostname aliases.
• “CommandLine” shows the run time configuration options set in the configuration file and on the command
line for each host.
All of these interfaces, except for the Command Line, provide a search field in the upper right corner to filter the lists
in real time.
Note: If you see a hostname in displayed in orange on the host page, this means that:
• On Prem MMS Monitoring has detected startup warnings for this host. You can see the warning in the last ping
for the host.
• On Prem MMS Monitoring suspects that the host has a low ulimit setting that is less than 1024. On Prem
MMS Monitoring infers the host’s ulimit setting using the total number of available and current connections.
On Prem MMS Monitoring flags deactivated hosts with an amber yield sign on the host page. If you have deactivated
hosts, On Prem MMS Monitoring will add a warning icon (the amber “yield” sign) at the top of the “Hosts” page.
Important: If you have deactivated hosts, review all deactivated hosts to ensure that they are still in use, and remove
all hosts that are not active. Then click on the warning icon and select “Reactive ALL hosts”.
The Hosts Table
Host Groups From the Hosts page, you can display groups of hosts in one view. By following a link from the
“Cluster” or “Repl Set” columns, you can see a side-by-side comparison of charts from all hosts in a given cluster or
replica set.
22
Host Labels “Host Labels” provide a method to narrow the list of hosts in the MMS display. This is particularly
crucial if you monitor a large number of hosts and want to access a more limited set of hosts.
A pencil icon on the “Hosts” tab itself opens a dialogue where you may create a new host label. After adding the first
label, a drop down box appears where you can narrow the view by selecting a group.
To add hosts to a label or labels, click on the “Edit Host,” button (a pencil) in the rightmost column in the host table.
In the dialogue box that returns, the third tab allows you to select or remove labels from this host.
Hosts may belong to none, one, or multiple labels.
Creating Host Aliases “Host Aliases” enables you to create host aliases for the hosts you monitor with MMS.
These aliases are arbitrary, and are useful if your machines have existing hostnames that do not sufficiently describe
the system in the context of MMS.
To set an alias for a host, click on the “Edit Host” button (a pencil) in the far right column of the hosts table. Port
numbers are not appended to host aliases.
Removing Hosts MMS cannot ignore any hosts added in the discovery process. You can always manually delete
a host from the MMS dashboard by clicking on the trash icon on the far right of the host entry in the hosts table. If
you want to add monitoring for a host that you have deleted from MMS, you must add this host manually using the
“+ ADD HOST” button at the top of the “Hosts” page. For more about monitoring hosts, see “Monitoring Hosts with
MMS”.
DB Profiling On Prem MMS Monitoring can collect data from MongoDB’s profiler to provide statistics about performance and database operations.
This data can include sensitive information, including the content of database queries. Ensure that exposing this to
On Prem MMS Monitoring is consistent with your information security practices. Additionally, be aware that the
profiler can consume resources which may adversely affect MongoDB performance. Consider the implications before
enabling profiling.
To allow On Prem MMS Monitoring to collect profile data for a specific host, click the “Enable profile data transmission,” button (the clock icon), in the far right column of the hosts table. It is the middle of the three icons. This raises a
dialogue box that describes the implications of DB profiling and allows you to enable the transmission of the profiling
data to On Prem MMS Monitoring.
Note: The Monitoring agent attempts to minimize its effect on the monitored systems. If resource intensive operations, like polling profile data, begins to impact the performance of the database, On Prem MMS Monitoring will
throttle the frequency that it collects data. See “How does MMS gather database statistics?“for more information
about the agent’s throttling process.
When enabled, On Prem MMS Monitoring samples profiling data from monitored instances: the agent only sends the
most recent 20 entries from last minute.
When you select “Enable Profile Info Transmission,” the Monitoring agent will begin sending profile data to On Prem
MMS Monitoring. All configuration changes made in the MMS console can take up to 2 minutes to propagate to the
agent and another minute before profiling data appears in the MMS interface.
However, to begin collecting profile data, you need to modify the value of setProfilingLevel on the database
itself. See the database profiler documentation for instructions for using the profiler. There is a link at the bottom of
the Host Statistics page that displays the profile levels.
If you have profiling data, and wish to delete it from the system, there is a button on the bottom of the “Profile Data”
tab, that says “Delete Profile Data.” When you click on this button, the MMS Console raises a confirmation dialogue.
When you confirm, On Prem MMS Monitoring will begin removing stored profile data from this server’s record.
23
Note: If On Prem MMS Monitoring is storing a large amount of profile data for your instance, the removal process
will not be instantaneous.
Agents
The “Agents” tab of the “Hosts” section contains information about the deployed Monitoring agents, and has the
following fields:
• Hostname: the name of the host running the agent.
• Address: the IP address of the address running the agent.
• Hosts: the number of MongoDB instances this agent monitors.
• Ping Count: the number of pings (i.e. data payloads) sent by the agent since midnight GMT. Typically agents
send pings every minute.
• Conf Count: the number of configuration requests sent by the agent since midnight GMT. Typically agents
request configuration updates every two minutes.
• Version: the version of the agent software running on this agent instance.
• Last Ping: the last time this agent sent a ping to the MMS servers.
• Last Conf: the last time the agent made a configuration request of the MMS servers.
Remember, if you have more than one Monitoring agent, only one agent actively monitors MongoDB instances at
once. See “Monitoring Architecture” for more information.
Events
The “Events” section relays information about the Monitoring agent’s operations. Possible event types are:
• “new host” occurs when the agent identifies a new MongoDB host.
• “restart” occurs when a mongod or other monitored instance restarts.
• “upgrade” occurs after upgrading mongod to a new version.
• “now secondary” occurs when a mongod instance becomes secondary in a replica set.
• “now primary” occurs when a mongod instance becomes primary in a replica set.
Alerts
The “Alerts” section provides access to On-Prem MongoDB Management Service‘s alert system. This section has
three tabs: open alerts, closed alerts, and alert settings. Following the installation of your first Monitoring agent, the
system configures an alert to send an email when the agent is down. You can delete or modify this alert as you like.
Types
There are four possible alert types. On Prem MMS Monitoring:
• “Host Down” activates in response to a mongod or other monitored instance restarts or fails to check in to
MMS within 90 seconds. There are no “host down” alerts if the agent is down.
• “Agent Down” activates in response to an agent that fails to report to MMS within 90 seconds.
24
• “Host Recovering” activates when a replica set member enters RECOVERING status.
• “Metric Min/Max Value” activates when a monitored metric passes a specified threshold.
MMS will add additional alert types in the near future.
Configuring Notifications You can create notifications for any of the above alert types. Click on the + Add Alert
button next to the word “Alerts” at the top of these pages. This will raise a dialogue where you can create email, SMS,
or SNMP alerts for any of these event types.
Note: The MIB file for SNMP is available for download here.
You can configure the following options:
For all Alerts Except Metric Min/Max Value
• Address specifies an address to send alert emails. For SMS alerts specify the telephone number that will receive
the alert. For SNMP alerts specify the hostname that will receive the v2c trap on standard port 162.
Warning: Telephone numbers are not validated or checked, and users must ensure that they have entered the
correct number into the Alerts interface.
• Type to select from text email, HTML formatted email, SMS, or SNMP alerts.
• Frequency Config (minutes) to select how often to send alerts, in minutes.
• Minimum Time Before Notification specifies how long MMS will wait before sending a notification. Raising
this value will increase the amount of time between the identification of an issue and the alert, but it may reduce
potential false positives.
You may also create multiple alerts with different minimum times before notification to implement alert escalation.
Important: The time between re-notifications increases by the frequency amount every alert cycle (e.g. 5
minutes, 10 minutes, 15 minutes, 20 minutes.)
For Metric Min/Max Value Alerts
• Host Type specifies the kind of monitored host. Options include: standalone, primary, secondary, mongos,
conf, master, slave, and individual/specific host.
• Replica Set specifies a monitored replica set to include in the alert.
• Field specifies the metric to use in the alert.
• Alert Value specifies the alert threshold. Use the toggles in this field to select greater than or less than and avg
per second or total per epoch.
• Contact Type specifies the method of contact. Select from text email, HTML formatted email, SMS message,
and SNMP trap.
• Contact Frequency Config (minutes) to select how often to send alerts, in minutes.
• Contact Min Time Before Notification specifies how long MMS will wait before sending a notification. Raising this value will increase the amount of time between the identification of an issue and the alert, but it may
reduce potential false positives.
You may also create multiple alerts with different minimum times before notification to implement alert escalation.
25
Important: The time between re-notifications increases by the frequency amount every alert cycle (e.g. 5
minutes, 10 minutes, 15 minutes, 20 minutes.)
Unresolved Alerts The “Open” tab displays a list of all monitored instances that have current unresolved alerts.
Check this tab to make sure that there are no outstanding alerts.
Resolved Alerts The “Closed” tab displays a record of all historical alerts. Use this tab as a record of past activity.
Alert Settings The “Settings” tab provides an interface for configuring alerts. You can delete and disable existing
alerts using the function buttons in the right hand column.
SNMP Integration The following is an example of using snmpwalk to query for SNMP health status:
$ snmpwalk -v 2c -c public mms.acmewidgets.com:11611 MMS-10GEN-MIB::mmsHeartbeatObject
MMS-10GEN-MIB::mmsHeartbeatHostnameId.0 = STRING: "[hostname]-[instance#]"
MMS-10GEN-MIB::mmsHeartbeatInterval.0 = INTEGER: 300
MMS-10GEN-MIB::mmsHeartbeatMessage.0 = STRING: "Healthy"
MMS-10GEN-MIB::mmsHeartbeatMessage.0 = No more variables left in this MIB View
(It is past the end of the MIB tree)
MIB File The MIB file is available for download at: http://downloads.mongodb.com/on-prem-monitoring/MMS10GEN-MIB.txt
Each of the main alert notification fields contain a brief description in the MIB file. an example of which follows:
Alert Trap:
mmsAlertId OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 64))
DESCRIPTION "The alert identification"
mmsAlertGroupName OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 256))
DESCRIPTION "The MMS group name from where the alert occurred"
mmsAlertHostId OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 64))
DESCRIPTION "The MMS Host ID of the affected host"
mmsAlertHostAndPort OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 256))
DESCRIPTION "The hostname:port of affected host"
mmsAlertStatus OBJECT-TYPE
SYNTAX INTEGER
{
new (1),
reminder (2),
clear (3)
}
DESCRIPTION "Is this alert new, a reminder of an existing alert, or clearing (closing)
an existing alert"
26
mmsAlertUrl OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 256))
DESCRIPTION "The url of the corresponding MMS alerts list page"
mmsAlertMetricName OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 128))
DESCRIPTION "The name of the triggering alert metric"
mmsAlertMetricThreshold OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 16))
DESCRIPTION "The threshold set on the metric"
mmsAlertMetricValue OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 16))
DESCRIPTION "The observed value of the metric which caused the alert to be triggered"
mmsAlertReplSetName OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 64))
DESCRIPTION "The Replica Set name (if applicable) to which this affected host belongs"
mmsAlertSeverity OBJECT-TYPE
SYNTAX INTEGER
{
debug (1),
info (2),
warning (3),
error (4),
critical (5)
}
DESCRIPTION "The severity of this alert, set automatically by MMS based on alert type"
mmsAlertSummary OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 256))
DESCRIPTION "Summary text description of the alert condition"
Heartbeat/Health Trap:
mmsHeartbeatHostnameId OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 256))
DESCRIPTION "Hostname and instance id of MMS server."
mmsHeartbeatInterval OBJECT-TYPE
SYNTAX
Integer32
DESCRIPTION "Interval in seconds between successive heartbeat notifications."
mmsHeartbeatMessage OBJECT-TYPE
SYNTAX DisplayString (SIZE (0.. 256))
DESCRIPTION "Text description of current MMS server health."
User and Environment Management
Users
You can grant users access to your group in the “Users” section of the MMS console. Click on the + ADD USER icon
next to your account name and enter their email in the dialogue. If the console finds a connected account, MMS will
automatically add the user to the MMS console.
27
Note: With MongoDB Management Service On-Prem, user accounts and groups are independent from JIRA. This is
in contrast to the MongoDB Management Service, which shares account and group information with the MongoDB
JIRA instance.
Users can create accounts at any time using the account registration page of your MMS installation.
Working with Multiple Environments
If you have multiple MongoDB systems in distinct environments and cannot monitor all systems with a single agent,
you will need to add a new group. Having a second group makes it possible to run two agents, because the API and
secret keys are unique to the group.
You may also use a second group and agent to monitor a different set of MongoDB instances in the same environment
if you want to segregate the hosts within the MMS console. A user can only view data from the hosts monitored in a
single group at once.
After adding a second group, the MMS interface will have a drop down list that will allow you to change groups.
Selecting a new group will refresh the current page with the data available from the servers in this group.
Create Group To add a new group click on the “Users” page, and click on the “Add New Group” link on the upper
left hand side of the page. Then, specify the new group name and select the + Add New Group button to create the
new group. Group names must be unique and you cannot reuse a group name. After creating a group, only the current
user account is a member that group. To add more people, click on the “Users” page in your new group.
Rename Group If you want to change the name of a group, click on the edit group name button (with the pencil
icon) near your group name at the top of the “Users” page of the MMS console. Group names must be unique and you
cannot reuse a group name.
Remove Group You can remove users from a group at any time from the “Users” page.
Although it’s not possible to delete a group, you can remove a group by removing all users from the group, and then
remove your own account from the group. The group will then be orphaned. It will remain for auditing purposes, but
be otherwise inaccessible.
Dashboards
With On Prem MMS Monitoring dashboards, you can create customized collections of charts for easier data analysis.
You can configure On Prem MMS Monitoring to automatically load a dashboard rather than the Hosts page from the
MMS settings page.
You can create multiple dashboards as your needs dictate. Use the plus icon at the top of the page to specify a name
and create a new dashboard, or select “New Dashboard...” when adding a chart to a dashboard . You can rename or
remove a dashboard from links on the bottom of a dashboard page. Dashboards have the same chart controls as the
host statistics pages.
Adding and Removing Charts from Dashboards
You can add any On Prem MMS Monitoring chart to any dashboard by selecting the plus sign (i.e. “+”) in the chart
toolbar of the desired chart on the Host Statistics page.
To remove a chart from a dashboard, navigate to the dashboard and select the “x” icon in the chart toolbar.
28
Advanced Dashboard Creation
When adding a new dashboard, you can select the “+ ADD CHART” button to create a dashboard that includes a
custom selection of charts, or a collection of charts from a dynamically assembled list of hosts. From this page, you
may create new dashboards or append new charts to existing dashboards. You can filter the included processes by host
type.
Specify the list of hosts to include in this dashboard by selecting a replica set or shard cluster or writing a regular
expression to match monitored processes’ hostnames. If checked, the “Host Alias In Regexp” check box allows you
to use the regular expression to select the aliased hostname you configured, rather than the actual hostname. Below
the host configuration options you may toggle an option to “group hosts in chart,” which creates a single composite
chart for all matching charts.
Below this, there are 17 chart types that you can use to select charts for this dashboard. Below the chart selection,
the final row of buttons allows you to: (optionally) test the “host regexp” to ensure that your regular expression is
sufficiently selective; preview the charts that this operation will add to the dashboard; and submit these changes to the
dashboards.
You can add and remove charts to these dashboards manually. You may also add additional charts using the “advanced
create dashboard” functionality by specifying an existing dashboard in the first field.
Settings
The “Settings” section of the On-Prem MongoDB Management Service (MMS) console enables users to personalize
their console and activate or deactivate a variety of features. The following sections correspond to a tab on the Settings
page.
Personalization
The Personalization page allows users to configure the console to suit their needs and preferences.
• Chart Refresh: sets the rate at which the data displayed in the charts on your dashboards or on the “Hosts
Statistics” page refreshes.
• Default Chart Display Type: sets the default metric that will appear in your charts. You can choose from the
average per second, or the total. This determines the default “display” on the “Hosts Statistics” and “Dashboard”
pages.
• Default Chart Epoch Type: sets the scale for the chart data, either 1 day, 1 hour, 5 minutes, or 1 minute. This
determines the default “resolution” selection on the “Host Statistics” and “Dashboard” pages.
• Default Chart Window: sets the time period displayed by default in the charts on the “Hosts Statistics” and
“Dashboard” pages.
• Default Dashboard: sets the default dashboard on the “Dashboard” page. You can select from a list of all of
your dashboards.
• Homepage: sets which page of the MMS console you will see when you log into MMS. You can choose from
the “Hosts” page, or the “Dashboard” page.
• Separate Opcounter Charts: allows you to control the presentation of Opcounter Charts. If enabled, MMS
charts each opcounter type separately. Otherwise, each opcounter type is overlaid together in a single chart.
• Group Change: sets which page of the MMS console you will see when you select a different group. You
can select the “Hosts” page or the “Dashboard” page. Alternatively, select “Current” and MMS will not change
pages when you select a different group.
29
• Display Chart Annotations: toggles the presence of chart annotations. Chart annotations overlay information
about significant system events on the charts. For example, with chart annotations MMS will draw a red vertical
line over the charts.
• User Time Zone: sets your local time zone.
• Log Data Collection For All Hosts: activates or deactivates the collection of log data for all hosts. This
overwrites the statuses set on the individual hosts. MMS displays log data in the “Logs” tab of the “Host
Statistics” page.
• User Language: allows you to select the language the MMS Console will display in.
• User Date Format: allows you to select your preferred date format.
• Group Time Zone: sets your group’s time zone.
Preferred Hostnames
Preferred Hostnames allows you to specify the hostname to use for servers with multiple aliases. This prevents servers
from appearing multiple times under different names.
DB Stats
DB Stats allows you to enable or disable the collection of DB Stats. For more information, see “How does MMS gather
database statistics?”.
Exposed DB Host Check
When you set :guilabel‘Exposed DB Host Check‘, MMS will periodically try to connect to your Mongo instance. If
your configuration is secure, this should fail. If the attempt is successful, MMS sends you an alert.
Duplicate Hostnames
Duplicate Hostnames allows you to reset and remove all detected duplicate hosts. This is useful if your server environment has drastically changed and you believe a host is incorrectly marked as a duplicate.
Email Settings
Email Settings makes it possible to opt-in to, or opt-out of receiving 10gen’s e-mail newsletters about MMS.
API Key
API Key displays the On Prem MMS Monitoring API Key for your MMS group. Keep this key private. Use the API
key to support automated agent installation.
Secret Key
Secret Key displays the On Prem MMS Monitoring Secret Key for your group. Keep this key private. Use the Secret
key to support automated agent installation.
30
MMS Agent
Monitoring Agent provides links for downloading the pre-configured Monitoring agent in both .zip and .tar.gz
formats. It also provides links to download a generic agent for automated agent installation.
Clicking on any host name in the hosts table of the “Hosts” tab will give you access to detailed statistics about that
host. For detailed instructions on interacting with this data, please see:
Host Statistics
The MMS web console provides an extensive set of features for analyzing the statistics collected by the Monitoring
agent. For a basic overview of the console, see the usage documentation. This document provides a more in-depth
guide for the “Host Statistics” page of the MMS console.
Accessing the Host Statistics
In the “Hosts” section, click any hostname link to view the data collected from that process. The charts on this “Host
Statistics” page are interactive, and provide tools for navigating and working with On Prem MMS Monitoring data.
Click on the “info” buttons with an i in a circle to raise informational boxes, to explore the functionality of the MMS
console and charts.
Global Page Controls
There are three to five items in the line below the MMS console’s menu bar. From left to right, these are:
• The hostname and port of the process. This is a link to the raw JSON content of the latest information gathered
from this host.
• The host type. Possible types include: “primary,” “secondary,” “master,” “slave,” “standalone,” “recovering,”
and “unknown.”
• Optionally, the name of the replica set to which this process belongs. Only replica set members have this value.
The name of the set links to a page with all of the charts from all members of a set.
• Optionally, the name of the shard cluster to which this process belongs. Only shard cluster members have this
value.
• The version of MongoDB running on this process.
The second line contains nine links that control the host statistics page. On Prem MMS Monitoring displays the current
selection in a larger font. In the second line there is a “window” selector that narrows the amount of data displayed.
These options are:
• “by minute,” which is the default setting. All charts plot one data point per minute. The “window” options are:
– “one hour,” which is the default window for this selection and charts 1 hour of data.
– “six hours,” which charts 6 hours of data.
– “twelve hours,” which charts 12 hours of data.
– “twenty-four hours,” which charts 24 hours of data.
• “by 5min,” which re-plots all charts with five-minute averages. The “window” options are:
– “six hours,” which charts 6 hours of data.
– “twelve hours,” which charts 12 hours of data.
31
– “twenty-four hours,” which is the default window for this selection and charts 24 hours of data.
– “forty-eight hours,” which charts 24 hours of data.
• “by hour,” which re-plots all charts with hourly averages. The “window” options are:
– “one day,” which charts 1 day of data.
– “one week,” which charts 1 week of data.
– “two weeks,” which charts 2 weeks of data.
– “one month,” which is the default window for this selection and charts 1 month of data.
– “two months,” which charts 2 months of data.
• “by day,” which re-plots the chart to display a period of time greater than 24 hours. The “window” options are:
– “one week,” which charts 1 week of data.
– “two weeks,” which charts 2 weeks of data.
– “one month,” which is the default window for this selection and charts 1 month of data
– “six months,” which charts 6 months of data.
– “one year,” which charts 1 year of data.
• “range,” which allows you to specify a time rage for the charts to display.
• “avg/sec,” which is the default setting. When selected, charts display the average number of events per second.
• “total,” which allows you to re-plot the charts to display the total number of events.
• “gmt,” which allows you to re-plot the charts to the GMT zone. Use this option when correlating MMS data
with server logs in GMT rather than your local timezone.
• “refresh,” which triggers a refresh of all charts.
On the next line, the “multi-chart zoom” slider allows you to change the scope of all charts at once. Move the sliders
on either end of this bar to narrow all of the charts on this page at once.
Specific Chart Controls
You may also interact with the charts individually. Using the mouse you can:
• Click-and-drag to select a portion of the chart to zoom into.
• Double-click to revert to the default zoom setting.
• Shift-click-and-drag (i.e. hold the shift key while clicking and dragging) to scroll left and right.
You can control each On Prem MMS Monitoring chart using the buttons at the top right of the chart container in the
“chart toolbar.” From left to right, these controls are:
• “Add To Dashboard,” a plus sign, takes you to a dashboard creation page where you can create a new dashboard
and add a collection of charts to the new dashboard.
• “Expand Chart,” an icon with two arrows expanding, raises a box with a larger version of the chart.
• “Chart Permalink,” a chain, links to a page that only displays this chart.
• “Email Chart,” an envelope, raises a dialogue box where you can input an email address and short message to
send the chart to an arbitrary email address.
• “View Legend,” the character i in a circle, raises a box with a key to the chart.
32
Chart Annotations
Annotations may appear as colored vertical lines on your charts to indicate server events. The following color/event
combinations are:
• A red bar indicates a server restart.
• A purple bar indicates the server is now a primary.
• A yellow bar indicates the server is now a secondary.
If you do not wish to see the chart annotations, you can disable them on the “Setting” page.
Next Steps
The MMS web console contains a great deal of functionality beyond the scope of this overview. Continue to explore
the functionality addressed above in your own system, with your own data.
1.4 Frequently Asked Questions: On Prem MMS Monitoring
How do I add a new host or server?
Click on the plus icon on the top of the hosts page.
How do I download the preconfigured agent?
You can download a preconfigured agent from the “Agent” section on the settings page.
How do I setup and configure the agent?
See the README file included in the agent download.
Should I run more than one agent?
The Monitoring agent is fairly robust, and MMS automatically sends an Agent Down alert when a Monitoring agent
becomes unavailable. For most applications, a single Monitoring agent is sufficient. However, you can choose to run
more than one agent to provide redundancy. See: Monitoring Architecture for information.
How does MMS gather database statistics?
In most instances, On Prem MMS Monitoring will scale its request cycle to limit more expensive statistics gathering.
The information on the DB Stats tab updates every 10 minutes, and the agent will throttle the frequency to reduce the
impact on the database. 2 Even so, the “DB stats” operation impacts the performance of your database, as is possible
when installations have a large number of databases and collections.
In these situations you must disable database stats collection. See the “DB Stats” section on the “Settings” page in the
MMS Console before starting your agent.
2
The DB Stats tab will not appear until 30 minutes after you add the host to On Prem MMS Monitoring.
33
Can I run the Monitoring agent on an AWS micro instances?
If you are monitoring five or fewer mongod instances, you can use a AWS micro instance.
Can I monitor Kerberos-enabled nodes?
No. On Prem MMS Monitoring does not currently support monitoring for Kerberos-enabled nodes.
What are all those vertical bars in my charts?
A red bar indicates a server restart.
A purple bar indicates the server is now a primary.
A yellow bar indicates the server is now a secondary.
Why is my hostname displayed in orange?
Your server either has startup warnings or a very low ulimit set. This can introduce problems. If your startup warning
is about NUMA, see the MongoDB documentation. If you have a ulimit of 1024 or less, see the instructions for
increasing your ulimit.
Why is my Monitoring agent highlighted in red on the Agents tab?
Your agent is out of date. For instructions on updating the agent, see: Updating the MMS Agent.
What is “Exposed DB Host Check,” and why did MMS send me an “MMS Found Exposed
Databases!!!” Email?
If enabled on the settings page, the On Prem MMS Monitoring application servers will attempt to connect to your
MongoDB instances to help ensure that your firewall is properly configured. This is a weak security validation that
should not replace other auditing or intrusion detection system procedures.
This test runs once per day and attempts to connect using both the IP address and the non-canonical host identifier that
you see in the Name field of the Hosts page.
Why can’t the Monitoring agent connect to my host?
The most common problem is that the agent is unable to resolve the hostname of the server. Check DNS and the
/etc/hosts file.
The second most common problem is that there are firewall rules in place that prohibit access to the server from the
agent.
To test the connection, login to the server running the agent and run: mongo hostname:port/test If you are
unable to connect, the agent will not be able to connect.
In addition, On Prem MMS Monitoring does currently support monitoring for Kerberos-enabled nodes: if your host is
using Kerberos for authentication, the On Prem MMS Monitoring Agent will not be able to connect to it.
34
How do I modify my alert settings?
You can enable, disable, or modify alerts on the settings tab of Alerts page.
How do I reset my password?
You can reset your password using the password reset form.
How do I change my password?
You can change your password by resetting your password.
How do I add a user to my company/group?
If the user already has a MongoDB Jira or MMS account, you can add their username to your group on the admin
page.
If the user does not have a Jira account then they can create a new account. After they have created an account, you
can add their username to the company/group on the admin page.
What open source projects are you using?
• Database: MongoDB
• App framework: Google Guice
• Http server: Jetty
• Web framework: Jersey
• Misc server libs: Apache Commons
• UI lib: jQuery , Bootstrap
• Charts: dygraphs
• Graphics: Font-Awesome
1.5 On Prem MMS Monitoring Reference
This document contains references of the different types of hosts, databases, and other statuses that may occur in On
Prem MMS Monitoring.
Host Types
The possible values for the “Type” column in the Hosts page are:
• primary
• secondary
• standalone
• master
• slave
35
• unknown
• recovering
The “Host Type” selector on the advanced dashboard creator also includes:
• conf
• mongos
Note: The host type column may also have the value “no data,” which means that On Prem MMS Monitoring has not
received any data from the Monitoring agent for this host. Possible causes for this state:
• If the Monitoring agent can’t connect to the server because of networking restrictions or issues (i.e. firewalls,
proxies, routing.)
• If your database is running with SSL. You must enable SSL either globally or on a per-host basis. See Using
SSL with On Prem MMS Monitoring for more information.
• If your database is running with authentication. You must supply On Prem MMS Monitoring with the authentication credentials either when you’re adding a host or by clicking on the edit (i.e. “Pencil” button) on the right
of the entry on the “Hosts” page.
Host Process Types
On Prem MMS Monitoring can monitor the process types:
• mongod database processes
• mongod arbiter processes
• mongos
• Monitoring agents
Event Types
Types of events in the Events section of the MMS console:
• new host
• restart
• upgrade
• now secondary
• now primary
Alert Types
The available alert types are:
• Old Host Version
• Host Down
• Agent Down
• Now Secondary
• Now Primary
36
Chart Colors
• A red bar indicates a server restart.
• A purple bar indicates the server is now a primary.
• A yellow bar indicates the server is now a secondary.
Status Page
• cpu time
• db storage
• page faults
• repl lag
• replica
• network
• cursors
• queues
• connections
• background flush avg
• lock % 3
• btree
• non-mapped virtual memory
• memory
• asserts
• opcounters-repl
• opcounters
DB Stats Page
• collections
• objects
• average object size
• data size
• storage size
• num extents
• indexes
• index size
3
For versions of MongoDB after 2.1.1, this chart has a drop-down menu next to the tile that lists available databases, including “global” to
represent the global lock for this host. Select a database to see its lock utilization. See the documentation of lock reporting in serverStatus for more
information.
37
• file size
Database Commands Used by the Monitoring Agent
• serverStatus
• buildinfo
• getCmdLineOpts
• connPoolStats
• _isSelf
• getParameter
• ismaster
• getShardVersion
• netstat
• replSetGetStatus
• shards.find
• mongos.find
• config.chunks.group
• oplog.find
• collstats - oplog.rs
• sources.find (slave)
• config.settings.find
• dbstats
• db.locks
PyMongo Error Codes
10057
Authentication error.
Browsers Supported by the MMS Console
• Chrome 8 and greater.
• Firefox 4 and greater.
• IE 9 and greater.
38