ObserveNow
...
Integrations
Infrastructure

MongoDB

OpsVerse's Kubernetes agent can be used to collect metrics from MongoDB

Kubernetes

Add the following YAML snippet to the agent's values.yaml and run the agent based on these instructions.

YAML


MongoDB Atlas

To configure an Atlas integration with Prometheus, follow the steps below:

  • Complete the procedure given in the MongoDB documentaion
  • After the setup, a generated snippet is provided. Copy and store it securely and replace the username, password and the url in the below snippet.

Add the following YAML snippet to the agent's values.yaml and run the agent based on these instructions.

YAML


MongoDB

Add the following YAML snippet to the agent's values.yaml and run the agent based on these instructions.

YAML


Single Machine

Alternatively, you can install the Prometheus MongoDB exporter on a single machine.

Prerequisite(s):

Run this command to install the MongoDB exporter as a systemd unit:

Shell

  • The agent will begin scraping the metrics automatically; the script will drop the scrape target into /etc/opsverse/targets/, so the agent will begin automatically scraping
  • If you need to update MongoDB connection info, after you install, you may edit /etc/systemd/system/prom-mongodb-exporter.service with the appropriate CLI args you want, and then restart the service: