MongoDB

Dashboard

MongoDB Prometheus Exporter Dashboard. A fork inspired from https://grafana.com/grafana/dashboards/2583 which is made to work well with https://github.com/percona/mongodb_exporter.
Last updated: 9 months ago

Start with Grafana Cloud and the new FREE tier. Includes 10K series Prometheus or Graphite Metrics and 50gb Loki Logs

Downloads: 440

Reviews: 1

  • mongo_dashboard_screenshot_1.png
    mongo_dashboard_screenshot_1.png
  • mongo_dashboard_screenshot_2.png
    mongo_dashboard_screenshot_2.png

Dependencies: Add Prometheus job to get data from mongodb cluster:

    - job_name: mongodb
      scrape_interval: 5s
      static_configs:
        - targets: ['example-mongodb-svc.mongodb:9216']

Edit statefulset adding with your informations:

You need to change someDBs with: yourDatabase.yourCollection Example: config.transactions

and

create the metrics-user with permissions to get the necessary information from your database.

- name: mongodb-exporter
  image: bitnami/mongodb-exporter:0.20.6
  command: ["/bin/sh"]
  args: ["-c", '/opt/bitnami/mongodb-exporter/bin/mongodb_exporter --discovering-mode --mongodb.indexstats-colls=someDBs --mongodb.collstats-colls=someDBs --web.listen-address=":9216" --web.telemetry-path="/metrics" --mongodb.direct-connect=false --mongodb.uri="mongodb://${DBUSER}:${DBPASS}@${DBURL}/admin?ssl=false"']
  imagePullPolicy: Always
  env:
    - name: DBURL
      value: "localhost:27017"
    - name: DBUSER
      value: "metrics-user"
    - name: DBPASS
      valueFrom:
        secretKeyRef:
          name: metrics-user
          key: password
  ports:
  - name: metrics
    containerPort: 9216
    protocol: TCP
  resources:
    limits:
      cpu: "500m"
      memory: 800M
    requests:
      cpu: "500m"
      memory: 500M
  securityContext:
    allowPrivilegeEscalation: false
Get this dashboard:
14997
Dependencies: