Monitor MongoDB Databases
Introduction
This tutorial demonstrates how to view metrics for MongoDB Enterprise clusters. The Grafana instance, which is connected to the Logging Service pipeline, is used to provide the data visualization of the metrics. By collecting metrics with a monitoring system, such as Prometheus through the official MongoDB exporter, and visualizing them in a Grafana dashboard, you can instantly detect anomalies, set proactive alerts on SLA-critical thresholds, troubleshoot latency or contention issues, and plan capacity upgrades with data-driven confidence.
Overview
MongoDB offers a set of observable metrics that describe the following:
Server’s health and performance.
Replication state—from low‑level resource usage such as CPU, memory, disk I/O, and network.
Server‑wide counters such as connections, operations per second, cache hits, and page faults.
Detailed replica‑set statistics such as election timestamps, primary‑secondary lag, and write‑concern success rates.
Per‑command activity such as query, insert, update, delete, getMore, and lock counts.
MongoDB metrics turn raw runtime data into actionable insight, enabling reliable operations, faster incident resolution, and efficient resource utilization for any production deployment.
Metrics for MongoDB
The following metrics are offered to gauge the health of the MongoDB clusters.
Before you begin
You need to activate the Logging Service to create the necessary setup to view the Grafana dashboard. To do so, Create a Logging Pipeline. This establishes a successful logging pipeline connection. You can view the created logging pipeline in the Logging Service page. For more information, see View Logging Pipelines.
MongoDB Metrics Access using Grafana
Open Grafana Dashboard
1. From the Logging Service page, click Grafana Dashboard. The URL to the Grafana sign-in page opens in the browser.

2. Click Sign in with IONOS from the Grafana sign-in page.
3. Use the IONOS Cloud Data Center Designer (DCD) Single Sign-On (SSO) credentials and click Sign In.

Configure the Data Source
1. From the Grafana home page, on the left-hand menu, go to Connections > Data sources.
2. From the Data sources page, select IONOS Telemetry.

3. In the Settings tab, go to the Authentication section > HTTP headers.
4. Select Add header. You need to add an authorization header with a bearer token. To do so, configure the following:
Header: In this field, enter Authorization.
Value: Obtain the bearer token value from the Token Manager section in the DCD and prefix
Bearer
before the Token Value and add it here. For more information, see Generate authentication token.
5. Click Save & test, available at the end of the Settings page.
View MongoDB Database Metrics
1. From the Grafana home page, on the left-hand menu, go to Explore > Metrics.
2. Select Let's start! to start metrics exploration and choose IONOS Telemetry as the Data source.

3. In the Search metrics, type the keywords such as mongodb
to view metrics related to MongoDB.

Result: The metrics for MongoDB clusters are successfully available in the Grafana dashboard. For details on the metrics available, see Metrics for MongoDB.
Summary
MongoDB cluster metrics are accessible through the Grafana dashboard. This functionality is available when a logging pipeline connection is established and the cluster is active within your contract.
Alternatively, you can deploy and configure their own Grafana instance. In this case, establishing a logging pipeline connection is not required. Instead, you can directly configure the appropriate data sources in Grafana to visualize and monitor MongoDB cluster metrics.
Last updated
Was this helpful?