mongodb_exporter
mongodb_exporter copied to clipboard
No Data on the Dashboard
Describe the bug A clear and concise description of what the bug is. If the issue relates to PMM, please open JIRA PMM issue instead of GH issue.
Mongodb_exporter: Version: v0.34.0 Prometheus version: 2.38.0 Grafana version: 2.38.0 Dashboard: https://grafana.com/grafana/dashboards/12079
Metrics are ok on exporter UI and Prometheus UI but the dashboard on the Grafana shows no data on any of the metrics of https://grafana.com/grafana/dashboards/12079 dashboard
To Reproduce Steps to reproduce the behavior:
- what parameters are being passed to
mongodb_exporter
mongodb_exporter --mongodb.uri=mongodb://mongodb_exporter:[email protected]:27017 --collect-all
- describe steps to reproduce the issue
Expected behavior A clear and concise description of what you expected to happen.
Logs Please provide logs relevant to the issue
Environment
- OS,
- environment (docker, k8s, etc)
- MongoDB version
Additional context Add any other context about the problem here.
Please advise where are the documents of metrics collected by mongodb_exporter and working dashboard
Hi! I have the same problem!
Mongodb_exporter: v0.35.0 Prometheus version: v2.39.1 Mongodb: v5.0.9 Grafana version: v9.2.3 Dashboard: https://grafana.com/grafana/dashboards/12079
Metrics are ok on exporter UI and Prometheus UI but the dashboard on the Grafana shows no data on any of the metrics of https://grafana.com/grafana/dashboards/12079 dashboard
My /etc/systemd/system/mongodb_exporter.service [Unit] Description=MongoDB Exporter User=prometheus Group=prometheus
[Service] Type=simple Restart=always ExecStart=/usr/local/bin/mongodb_exporter --mongodb.uri=mongodb://mongodb_exporter:MYPASS@localhost:27017 --collect-all WantedBy=multi-user.target
Data comes to prometheus.
I have the same problem
Mongodb_exporter: 2.32.0
Prometheus version: 2.40.7
Mongodb: 6.0
Grafana version: 9.3.1
with Grafana Dashboard: 7353 works for me. Maybe you should upgrade mongodb_exporter
.
Here is my docker-compose
demo file:
version: "3.7"
services:
prometheus:
user: root
image: prom/prometheus:latest
restart: unless-stopped
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./prometheus_data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.console.libraries=/etc/prometheus/console_libraries"
- "--web.console.templates=/etc/prometheus/consoles"
- "--web.enable-lifecycle"
ports:
- 9000:9090
mongo:
image: mongo:6.0
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: example # mongo username
MONGO_INITDB_ROOT_PASSWORD: example # mongo password
MONGO_INITDB_DATABASE: example # mongo database
mongodb_exporter:
image: percona/mongodb_exporter:2.32.0
restart: unless-stopped
command: --mongodb.uri=mongodb://example:example@mongo:27017 --collect-all
ports:
- 9216:9216
depends_on:
- mongo
- prometheus
and prometheus.yml
:
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: prometheus
static_configs:
- targets: ["0.0.0.0:9090"]
- job_name: mongodb
static_configs:
- targets: ["mongodb_exporter:9216"]
Do you all have the --compatible-mode
enabled?
This is needed for the dashboards.