[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

- 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/opentelemetry/getting-started/index.md) installed

## Configuration

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

```yaml
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.[[DOMAIN_VALUE]]/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.[[DOMAIN_VALUE]]/prometheus/v1` with the **[Prometheus RemoteWrite endpoint](https://coralogix.com/docs/integrations/coralogix-endpoints/index.md)** associated with your Coralogix domain.

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

## Support

**Need help?**

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to reach out to us **via our in-app chat** or by sending us an email at [support@coralogix.com](mailto:support@coralogix.com).
