# MongoDB Atlas

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fintegrations%2Fmetrics%2Fmongodb-atlas.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fintegrations%2Fmetrics%2Fmongodb-atlas.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

[MongoDB Atlas](https://www.mongodb.com/) is is a fully-managed cloud database that handles the complexity of deploying, managing, and healing your deployments on the cloud service provider of your choice.

Deploy this integration to send your MongoDB Atlas metrics to you Coralogix account using the OpenTelemetry Collector.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

* Coralogix [account](https://signup.coralogix.com/#/)

* MongoDB Atlas [project](https://www.mongodb.com/docs/atlas/tutorial/manage-projects/#create-a-project)

* Private and public keys created for your MongoDB Atlas [organization](https://docs.atlas.mongodb.com/tutorial/configure-api-access/organization/create-one-api-key/) or the [project](https://docs.atlas.mongodb.com/tutorial/configure-api-access/project/create-one-api-key/) from which to send the data

* [OpenTelemetry](https://coralogix.com/docs/docs/opentelemetry/getting-started/.md) installed

## Configuration[​](#configuration "Direct link to Configuration")

**STEP 1**. Create a configuration file `/etc/otelcol-contrib/config.yaml` with the following parameters:

```
receivers:

  mongodbatlas:

    # You can obtain the public key from the API Keys tab of the MongoDB Atlas Project Access Manager.

    # This value is required.

    public_key: <<YOUR-MONGODB-ATLAS-PUBLIC-KEY>>

    # You can obtain the private key from the API Keys tab of the MongoDB Atlas Project Access Manager.

    # This value is required.

    private_key: <<YOUR-MONGODB-ATLAS-PRIVATE-KEY>>



exporters:

  logging:

  prometheusremotewrite:

    endpoint: https://ingress.eu2.coralogix.com/prometheus/v1

    headers:

      Authorization: "Bearer <private key>"

    external_labels:

      environment: "QA"

processors:

  batch:



extensions:

  pprof:

    endpoint: :1777

  zpages:

    endpoint: :55679

  health_check:



service:

  extensions: [health_check, pprof, zpages]

  pipelines:

    metrics:

      receivers: [mongodbatlas]

      processors: [batch]

      exporters: [logging, prometheusremotewrite]
```

* Replace `<<YOUR-MONGODB-ATLAS-PUBLIC-KEY>>` with the public key to your MongoDB Atlas organization or project.

* Replace `<<YOUR-MONGODB-ATLAS-PRIVATE-KEY>>` with the private key to your MongoDB Atlas organization or project.

* Replace `https://ingress.eu2.coralogix.com/prometheus/v1` with the **[Prometheus RemoteWrite endpoint](https://coralogix.com/docs/docs/integrations/coralogix-endpoints/.md)** associated with your Coralogix domain.

**STEP 2**. Restart your collector and view your metrics in your Coralogix dashboard.
