- Install On-Prem MMS >
- Install the On-Prem Monitoring Server
Install the On-Prem Monitoring Server¶
On this page
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 | CPU Cores | RAM | Storage Capacity | Storage IOPS/s |
---|---|---|---|---|
Up to 400 monitored hosts | 4+ | 15 GB | 200 GB | 500 |
Up to 2000 monitored hosts | 8+ | 15 GB | 500 GB | 10000+ (SSD) |
More than 2000 hosts | Contact MMS |
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
- SUSE 11 or Later,
- Amazon Linux AMI (latest version only,)
- Ubuntu 12.04 or later.
- 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.
Browsers¶
On Prem MMS Monitoring supports the following browsers:
- recent versions of Firefox, Chrome, and Safari
- Internet Explorer, Versions 9 and later.
The On Prem MMS Monitoring application will display a warning on non-supported browsers.
Installation Process¶
Overview¶
At a high level, a basic installation will look like the following. The estimated setup time is less than an hour.
- Install a standalone local MongoDB server backed by a fast, large storage volume.
- Install an SMTP email server as appropriate for your environment.
- Install the MMS server RPM package.
- Configure the MMS server’s URL and email addresses.
- Start up MMS server.
Prepare Server¶
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
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
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.
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:Install the MongoDB packages using the following operations:
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
/mnt/ebs-mnt-dir/mongo/
. Use the following commands:Issue the following command to ensure that the
mongod
process owns all paths below the/mnt/ebs-mnt-dir/mongo/
path:Edit the
/etc/mongod.conf
to include the following settings:This will configure the paths for the log and data directories. Adjust the paths as needed.
Start MongoDB.
Issue the following command:
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 DEB packages for Debian,
Ubuntu, and related systems; RPM for Red Hat Enterprise Linux, CentOS,
Fedora, and related systems; as well as tar.gz
and zip
packages.
You can also download the latest On-Prem Monitoring releases from <http://www.mongodb.com/commercialsupport/downloads> as an RPM package.
RPM Install¶
Install the RPM by issuing command in the following form:
Replace <version>
with the version of the .rpm
you
obtained. When installed, the base directory for the MMS software is
/opt/mongodb/mms/
. The RPM will also create a new system user
mongodb-mms
under which the server will run.
DEB Install¶
Install the DEB by issuing command in the following form:
Replace <version>
with the version of the .deb
you
obtained. When installed, the base directory for the MMS software is
/opt/mongodb/mms/
. The DEB package will also create a new system
user mongodb-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:
Optionally create a symlink in /etc/init.d
to the included control
script for convenience, as in the following:
Note, when the app is first started, it will create and store an encryption
key in $HOME/.mongodb-mms
for the app user.
Configure On-Prem MMS Server¶
This section describes the required configuration for the On-Prem MMS Server. See Advanced Configuration for more configuration information.
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:
These properties are blank initially, and you must define them before the On Prem MMS Monitoring instance will start.
In addition, whether or not you enable backup, define these properties if you use authentication:
Otherwise, MMS will fail while trying to connect to the default 127.0.0.1:27017 URL.
If you use the MMS <install_dir>/bin/credentialstool to encrypt the
password used in the mongo.mongoUri
value, also add the
mongo.encryptedCredentials
key to the
<install_dir>/conf/conf-mms.properties
file and set the value for this
property to true:
For more details, see Authentication Configuration below.
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:
Then, to the same file, set the following values as defined by your provider. Defaults specified inline:
The following two values are optional, and unless set default to disabled authentication:
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:)
To configure this integration you must also provide your AWS account credentials in the following two properties:
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]
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:
If the server starts successfully, you will see content in this file that resembles the following:
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.
[1] | If you installed from a tar.gz or
zip archive, you must create a symlink located at the path
/etc/init.d/mongodb-mms that points to the
<install_dir>/bin/mongodb-mms . |
Stopping the On-Prem MMS server is as follows:
Advanced Configuration¶
Change Port Number¶
Edit
<install_dir>/conf/conf-mms.properties
:Edit
<install_dir>/conf/mms.conf
Restart MMS server:
Run as Different User¶
Edit
<install_dir>/conf/mms.conf
:Change Ownership of
<install_dir>
for new user:sudo chown -R foo_user:foo_group <install_dir>
Restart MMS server:
.. code-block:: sh
sudo <install_dir>/bin/mongodb-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. For example:
See Connection String URI Format for more information.
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:
Important
You must modify every mongoURI
connection string
in the conf-mms.properties
file.
This does require that you store credentials in plain text; however, following standard practice you may reduce the permissions of the configuration file:
If you do not want to store credentials in plain text, On Prem MMS Monitoring provides a tool to encrypt the MongoDB credentials. To encrypt authentication credentials:
Navigate to the On Prem MMS Monitoring server installation directory.
Issue the following command to create an encrypted credential pair, replacing
<username>
with your username:This will prompt you to enter the password and will output the encrypted credential pair.
Copy the encrypted credential pair into the
MongoURI
connection strings of theconf/conf-mms.properties
file where needed, and add theencryptedCredentials = true
configuration option to indicate to MMS that the credentials are set as encrypted tokens.The added line(s) should resemble the following:
Important
You must modify every mongoURI
connection string
in the conf-mms.properties
file.
Optional: Configure a Required reCaptcha for user Registration¶
To enable reCaptcha anti-spam test on new user registration, sign up for a reCaptcha account and provide the API credentials in the following two properties:
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:
Optional: Configure SNMP Heartbeat Support¶
New in version 1.3.0.
The MIB file is available for download at: http://downloads.mongodb.com/on-prem-monitoring/MMS-MONGODB-MIB.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.
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:
Optional: Configure Advanced MMS User Password Management¶
New in version 1.3.0.
You can configure the password policy for MMS user accounts with the following properties:
Optional: Configure Advanced MMS User Session Management¶
New in version 1.3.0.
You can configure the number of hours before a session on the MMS website expires with the following property:
Optional: Configure Jetty to use HTTPS Connections¶
You can configure the Jetty services that run the On-Prem MongoDB Management Service application to use HTTPS. See Configure On-Prem MongoDB Management Service Jetty Instances to use HTTPS for more information.