MongoDB Atlas is a fully-managed cloud database that handles deploying, managing and healing deployments on its cloud service provider.
Deploy this integration to send your MongoDB Atlas metric to your Logz.io account using OpenTelemetry collector.
Deploying the integration
Before you begin, you’ll need:
- A MongoDB Atlas project
- Private and public keys created for your MongoDB Atlas organization or the project to send the data from.
- An active account with Logz.io
Download and configure OpenTelemetry collector
Create a dedicated directory on your host and download the OpenTelemetry collector that is relevant to the operating system of your host.
After downloading the collector, create a configuration file
config.yaml with the following parameters:
receivers: mongodbatlas: public_key: <<YOUR-MONGODB-ATLAS-PUBLIC-KEY>> private_key: <<YOUR-MONGODB-ATLAS-PRIVATE-KEY>> exporters: logging: prometheusremotewrite: endpoint: https://<<LISTENER-HOST>>:8053 headers: Authorization: Bearer <<PROMETHEUS-METRICS-SHIPPING-TOKEN>> 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 the placeholders to match your specifics. (They are indicated by the double angle brackets
<<PROMETHEUS-METRICS-SHIPPING-TOKEN>>with a token for the Metrics account you want to ship to.
Here’s how to look up your Metrics token.
<<LISTENER-HOST>>with the Logz.io Listener URL for your region, configured to use port 8052 for http traffic, or port 8053 for https traffic. For example,
listener.logz.ioif your account is hosted on AWS US East, or
listener-nl.logz.ioif hosted on Azure West Europe.
<<YOUR-MONGODB-ATLAS-PUBLIC-KEY>>with the public key to your MongoDB Atlas organization or project.
<<YOUR-MONGODB-ATLAS-PRIVATE-KEY>>with the private key to your MongoDB Atlas organization or project.
Start the collector
Run the following command:
<path/to>/otelcol-contrib --config ./config.yaml
<path/to>with the path to the directory where you downloaded the collector.
Check Logz.io for your metrics
Give your data some time to get from your system to ours, then log in to your Logz.io Metrics account, and open the Logz.io Metrics tab.