percona / mongodb_exporter

A Prometheus exporter for MongoDB including sharding, replication and storage engines
Apache License 2.0
1.2k stars 428 forks source link

mongodb_exporter0.39 problem #748

Open haodongz opened 1 year ago

haodongz commented 1 year ago
  1. The plug-in uses mongodb_exporter0.39, and the mogod version is mongo:4.2
  2. grafana version 9.4.3, prometheus, version 2.42.0 Problem Description:
  3. Use mongodb_exporter0.39 deployed with docker and specify mogo's IP and account password. Mongo and metrics can display indicators, but grafana and prometheus cannot query relevant statements and syntax. Is it a version mismatch? Which version of mongodb_exporter should be used to match mongo:4.2? image image image
BupycHuk commented 1 year ago

Hello, have you tested with an older mongodb_exporter? 4.2 is EOL and wasn't tested with the latest mongodb_exporter. Which flags were used to run container? Have you enabled compatible mode?

haodongz commented 1 year ago

Hello, have you tested with an older mongodb_exporter? 4.2 is EOL and wasn't tested with the latest mongodb_exporter. Which flags were used to run container? Have you enabled compatible mode? This is how I run it docker run -d -p 9216:9216 --name mongodb_exporter percona/mongodb_exporter:0.39.0 --mongodb.collstats-colls=routing.* --mongodb.uri="mongodb://xxx:lxxx@172.31.82.24:27017" --compatible-mode

haodongz commented 1 year ago

I only have these missing metrics right now! 1701331486277

BupycHuk commented 1 year ago

could you also add flag --collect-all?

haodongz commented 1 year ago

could you also add flag --collect-all? After adding --collect-all, the plug-in's logs report an error

image

allaboutstrategy commented 11 months ago
command:
  - "--compatible-mode"
  - "--collect-all"

  these together fixed it for me,

  then I have a huge list but it works
haodongz commented 11 months ago
command:
  - "--compatible-mode"
  - "--collect-all"

  these together fixed it for me,

  then I have a huge list but it works

Yes, I added the parameters --compatible-mode, --collect-all, but still got an error image

igroene commented 6 months ago

double check the permissions of the user that the exporter is using to connect to mongo?

haodongz commented 5 months ago

double check the permissions of the user that the exporter is using to connect to mongo?

As far as I know, the way containers run has nothing to do with permissions.

igroene commented 5 months ago

I was referring to the missing metrics. This is usually due to bad perms for the exporter. Also did you test if 0.40 fixes your issue? I am reopening this one