ObserveNow
...
Integrations
Infrastructure

MongoDB

opsverse's kubernetes agent https //docs opsverse io/install the opsverse agent#veqxm 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 https //docs opsverse io/install the opsverse agent#veqxm mongodb exporter enabled true annotations prometheus io/scrape "true" \# option a \# \[mongodb\[+srv] //]\[user\ pass@]host1\[ port1]\[,host2\[ port2], ]\[/database]\[?options] mongodb uri "" \# (or) alternatively, option b \# name of an externally managed secret (in the same namespace) containing the connection uri as key `mongodb uri` \# if this is provided, the value mongodb uri is ignored existingsecret name "" key "mongodb uri" mongodb atlas to configure an atlas integration with prometheus https //prometheus io/ , follow the steps below complete the procedure given in the mongodb documentaion https //www mongodb com/docs/atlas/tutorial/prometheus integration/#procedure 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 https //docs opsverse io/install the opsverse agent#veqxm \ job name "\<job name>" scrape interval 10s metrics path /metrics scheme https basic auth username \<username> password \<password> http sd configs \ url https //cloud mongodb com/prometheus/v1 0/groups/\<placeholder>/discovery basic auth username \<username> password \<password> mongodb add the following yaml snippet to the agent's values yaml and run the agent based on these instructions https //docs opsverse io/install the opsverse agent#veqxm mongodb exporter enabled true annotations prometheus io/scrape "true" \# option a \# \[mongodb\[+srv] //]\[user\ pass@]host1\[ port1]\[,host2\[ port2], ]\[/database]\[?options] mongodb uri "" \# (or) alternatively, option b \# name of an externally managed secret (in the same namespace) containing the connection uri as key `mongodb uri` \# if this is provided, the value mongodb uri is ignored existingsecret name "" key "mongodb uri" single machine alternatively, you can install the prometheus mongodb exporter https //github com/percona/mongodb exporter on a single machine prerequisite(s) you have the opsverse agent running on the machine https //docs opsverse io/install the opsverse agent#dszlx run this command to install the mongodb exporter as a systemd unit \# for amd64 curl https //raw\ githubusercontent com/opsverseio/installers/main/prometheus exporters/install exporter amd64 sh | sudo bash s e mongodb \# for arm64 curl https //raw\ githubusercontent com/opsverseio/installers/main/prometheus exporters/install exporter arm64 sh | sudo bash s e mongodb 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 https //github com/percona/mongodb exporter/blob/main/reference md#flags , and then restart the service