MongoDB data source
The MongoDB data source plugin lets you query, visualize, and alert on data stored in your MongoDB collections directly from Grafana dashboards. Use find and aggregate commands to build time series panels, tables, and stat visualizations from your document data.
Note
The MongoDB data source is an Enterprise plugin. It’s available with a Grafana Cloud Pro or Advanced plan and Grafana Enterprise. For installation instructions, refer to Install and upgrade the MongoDB data source plugin.
Supported features
Requirements
The MongoDB data source has the following requirements:
- Grafana version 11.6.7 or later.
- A Grafana Cloud Pro or Advanced plan or an activated self-managed Grafana Enterprise license.
- A MongoDB 5.0+ instance with at least one user. Supported deployments include:
- MongoDB Atlas (shared and dedicated tiers)
- Self-managed MongoDB (standalone, replica set, or sharded cluster)
- AWS DocumentDB (with
TLS configuration and
retryWrites=false)
- Port 27017 (or your configured MongoDB port) accessible from the Grafana server.
Known limitations
The following are current known limitations:
- Only
findandaggregateread commands are supported. - Refer to Diagnostics for a list of currently supported diagnostics commands.
- Regex flags
gandsare not supported.
Get started
The following documents help you get started:
- Install and upgrade the MongoDB data source plugin
- Configure the MongoDB data source
- MongoDB query editor
- MongoDB templates and variables
- MongoDB annotations
- MongoDB alerting
- Troubleshoot issues with the MongoDB data source
Additional features
After configuring the data source, you can:
- Use the Grafana Assistant button in the query editor to generate MongoDB queries from natural language prompts.
- Create time series, table, stat, and other visualizations.
- Add annotations to overlay deployment or error events on graphs.
- Configure template variables to build dynamic, reusable dashboards.
- Apply transformations to reshape query results.
- Set up alert rules to monitor collection metrics.
- Route traffic through a secure proxy. Refer to Configure a data source connection proxy for configuration instructions.
Note
Proxying requires the feature toggle
secureSocksDSProxyEnabledset toEnabled.
Plugin updates
Always ensure that your plugin version is up-to-date so you have access to all current features and improvements. For upgrade and rollback steps, refer to Upgrade the plugin.
Note
Plugins are automatically updated in Grafana Cloud.


