Menu
Enterprise
MongoDB data source
MongoDB is a distributed document database. The MongoDB data source plugin allows you to visualize data from MongoDB in Grafana.
The following will help you get started working with MongoDB and Grafana:
Requirements
The MongoDB data source has the following requirements:
- A MongoDB instance with at least one user.
- Any free or paid Grafana Cloud plan or an activated on-prem Grafana Enterprise license. Contracted Cloud customers should refer to their agreement.
- Port 27017 enabled.
Known limitations
- Only
find
andaggregate
read commands are supported - See Diagnostics for a list of currently supported diagnostics commands
- Regex flags
g
ands
are not supported
Install the MongoDB plugin
To install the MongoDB plugin see Installation.
Provision the MongoDB data source
You can define and configure the MongoDB data source in YAML files as part of Grafana’s provisioning system. For more information about provisioning a data source, and for available configuration options, see Provision Grafana.
yaml
apiVersion: 1
datasources:
- name: MongoDB
type: grafana-mongodb-datasource
access: proxy
basicAuth: false
editable: true
enabled: true
jsonData:
connection: Connection string
user: user name
secureJsonData:
password: password
Get the most out of the plugin
After installing and configuring MongoDB you can:
- Add Annotations.
- Configure and use Templates and variables.
- Add Transformations.
- Set up Alerting.
- Set up proxying. See Configure a data source connection proxy for configuration instructions.
Note
Proxying requires Grafana v10.x and the feature togglesecureSocksDSProxy
set toEnabled
.
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video
Unify your data with Grafana plugins: Datadog, Splunk, MongoDB, and more
In this webinar, learn how to leverage Grafana's plugin ecosystem for access to 80+ data sources, including plugins for Datadog, Splunk, MongoDB, and more.
Video
Grafana plugins demo: GitHub, GitLab, JIRA, ServiceNow, and more
In this webinar, we'll show you how to use Grafana to unlock these insights and have better visibility into the performance of your software development team.
Video
All about Grafana plugins: Visualizing disparate data sources in one place
Grafana Enterprise plugins are integrations with other commercial monitoring tools (such as Datadog, Splunk, New Relic, ServiceNow, Oracle, and Dynatrace) that are created, maintained, and supported by the Grafana Labs team.