Monitoring and Alerts

Overview

mLab’s monitoring features are designed to ensure you always have insight into the health of your deployment.

mLab Telemetry

Not available for Sandbox databases

mLab’s Telemetry service is a real-time and historical monitoring tool for mLab deployments that tracks key MongoDB metrics and helps you effectively monitor and tune database performance. It provides a customizable dashboard that gives you the ability to easily view and compare database and OS performance over time. You can also define custom alerts with Telemetry.

If you clicked the “LIVE STATS” button after opening the Telemetry dashboard, you can view key performance metrics for your database deployment in real-time. These metrics are streamed from MongoDB’s mongostat utility.

When you open the live stats view, you will see the output of mongostat streaming in a tabular form. For an explanation of these metrics, read the mongostat documentation.

Custom alerts

mLab’s Telemetry service also allows you to define custom alerts on database metrics. When alert thresholds are breached, notifications will be sent to associated notification channels such as email or services like PagerDuty, HipChat, and Slack. For details, visit our documentation on Telemetry Alerts.

Further reading

mLab’s blog is a place where we provide additional insight and assistance with Telemetry-related metrics and features. Our posts are designed to help you make the most out of the valuable data in Telemetry with articles such as:

mLab Slow Query Analyzer

Not available for Sandbox databases

The Slow Queries feature in the mLab management portal provides an analysis of the slow operations that have recently run on your database deployment. We run this analysis several times a day so that you can have up-to-date information.

From your account’s Home page, navigate to the deployment you want to analyze.

Click the “Slow Queries” tab.

For each query found in your logs (by default those taking over 100ms), we provide statistics about that query, and let you know if the query is properly indexed. Results are sorted by the total time consumed by all occurrences of a query, so that the most expensive queries are at the top.

If you have not already added what the slow query analyzer considers an ideal index, click “Build this index” button next to the recommendation to create that index.

Note: An optimally indexed query with a high average time is potentially a symptom of other unindexed queries.

This analysis is not a substitute for having a direct understanding of your data model and the queries your application uses. Also, be careful to avoid creating too many indexes or redundant indexes. If you have any questions, don’t hesitate to email support@mlab.com at any time.

MongoDB log files and database profiler

Access to MongoDB log files

mLab has made it convenient to access database server log files through the mLab management portal and watch in real-time as operations are written to the log. You can also download archived log files instead of streaming them, if you choose.

While MongoDB stores its times in UTC, mLab’s database log files are logging in UTC-08 (or UTC-07 during Pacific Daylight Time), based on the timezone setting of the underlying hosts for your deployment.

Current log file streaming

Not available for Sandbox databases

To watch in real-time as operations are written to the log, follow these instructions:

Navigate to the system.profile collection to analyze the results of the profiler.

If you choose “profile (log slow)”, MongoDB logs operations that take longer than the SLOW_MS value set for your database (the default is 100ms). You can check the current SLOW_MS value by selecting the “profile (get current status)” command in the mLab management portal, or by running db.getProfilingLevel() in the mongo shell.

Disabling the profiler and deleting the results

To turn off the database profiler and delete the data in the system.profile collection:

Click the “Tools” tab.

Click the “Commands” link to display the “Commands” drop-down menu.

To disable the profiler, select “profile (turn off)” in the drop-down menu.

(Optional) To clear the contents of the profiler, connect to your database using the mongo shell and run db.system.profile.drop().

Critical availability notifications

Notifications about incidents which have impacted or may impact the availability of your deployment will always be sent to the appropriate Account Contacts listed for your mLab account or posted on our status page, mLab Status.

Types of critical availability notifications

Downtime

If your database is experiencing or has experienced downtime, you can expect to receive updates about this downtime on mLab Status or via an email notification to the Technical Contact listed on your account.

Note that we do not post incidents on our public status page about free Sandbox databases that have been or will be down for a short period of time since these are single-node plans without redundancy.

Generally if a notifiation is sent via email directly to an account, it will not also appear on mLab Status. If you have a question about your deployment and don’t see anything relevant on our status page, you may have been alerted directly through email. Otherwise, contact support@mlab.com for more information.

If you have a Dedicated Cluster plan deployment which is facing a critical, production issue that requires immediate attention, you may also use the emergency email address we have provided.

Integrating with third parties

New Relic

Not available for Sandbox databases

If you use New Relic for application performance management (APM), you can integrate your mLab-hosted deployment(s) to quickly view MongoDB performance metrics.

Our plugin provides users with important MongoDB serverStatus data. Specifically, you can view the following database metrics:

Operations

Queues

Lock %

Page Faults

Non-mapped Virtual Memory

Memory

Replication Operations

Replication Lag

Oplog Window

The plugin also comes with default alert thresholds set on the database lock % metric. If there are any other metrics you’d like to see, let us know at support@mlab.com.

Setting up the integration

For teams that already use New Relic, simply add your New Relic APM license key to your mLab account by following these steps:

Click “Account” in the upper right-hand corner to open the Account Settings page.

Click the “Monitoring” tab.

Enter your key in the “License key” field in the “New Relic” section.

Click “Save key”.

Datadog

Available for Dedicated plans only

If you use Datadog to monitor your infrastructure and applications, you can integrate an mLab-hosted Dedicated plan deployment with this service by running your own monitoring agent from the same datacenter/region as your database deployment and then using the Datadog-MongoDB integration to gather MongoDB performance metrics. Note that we do not install the Datadog agent directly on the mLab-hosted virtual machines.

As per Datadog’s documentation, the integration requires full admin access. Full admin access is only available on our Dedicated plans.