Menu
Documentationbreadcrumb arrow Pluginsbreadcrumb arrow MongoDB data source
Enterprise Grafana Cloud

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:

Known limitations

  • Only find and aggregate read commands are supported
  • See Diagnostics for a list of currently supported diagnostics commands
  • Regex flags g and s 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:

Note

Proxying requires Grafana v10.x and the feature toggle secureSocksDSProxy set to Enabled.