Monitor MongoDB with Grafana Cloud
Welcome to the MongoDB monitoring learning journey that shows you how to use Grafana Alloy to send MongoDB metrics to Grafana Cloud for comprehensive database observability.
MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era. Monitoring MongoDB performance is critical for maintaining optimal database operations, identifying bottlenecks, and ensuring reliable application performance.
Grafana Alloy is a vendor-neutral distribution of the OpenTelemetry Collector. Alloy offers native pipelines for OpenTelemetry, Prometheus, Pyroscope, and Loki without the need to operate multiple agents. The single binary deploys anywhere and automatically scales up or down based on send volume.
This integration includes 10 useful alerts and 3 pre-built dashboards to help monitor and visualize MongoDB metrics, providing insights into database performance, connection statistics, replication status, and operational health.
The image below shows the MongoDB Instance Overview dashboard displaying key performance metrics.

Here’s what to expect
When you complete this journey, you’ll be able to:
- Understand the value of MongoDB monitoring and observability
- Install and configure Grafana Alloy for MongoDB metrics collection
- Set up secure MongoDB connection strings and authentication
- Verify that MongoDB metrics appear in Grafana Cloud
- Install pre-built MongoDB dashboards and alerts
- Interpret MongoDB performance metrics and troubleshoot issues
Before you begin
Before you monitor MongoDB using Grafana Alloy, ensure that you have:
- A Grafana Cloud account. To create an account, refer to Grafana Cloud.
- A MongoDB instance up and running (local, cloud-hosted, or containerized).
- Network access between your Grafana Alloy installation and your MongoDB instance.
- MongoDB user credentials with monitoring permissions. Configure a separate user for Grafana Alloy with the mandatory security privileges necessary for monitoring.
- Access to the machine where you’ll install Grafana Alloy.
Troubleshooting
If you get stuck, we’ve got your back! Where appropriate, troubleshooting information is just a click away.
More to explore
We understand you might want to explore other capabilities not strictly on this path. We’ll provide you opportunities where it makes sense.
