GithubHelp home page GithubHelp logo

atward / mongodb_exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from percona/mongodb_exporter

0.0 1.0 0.0 1.96 MB

A Prometheus exporter for MongoDB including sharding, replication and storage engines

License: Apache License 2.0

Makefile 1.12% Go 98.88%

mongodb_exporter's Introduction

Percona MongoDB Exporter

Release Build Status Go Report Card CLA assistant

Based on MongoDB exporter by David Cuadrado (@dcu), but forked for full sharded support and structure changes.

Experimental

The exporter is in beta/experimental state and field names are very likely to change and features may change or get removed!

Features

  • MongoDB Server Status metrics (cursors, operations, indexes, storage, etc)
  • MongoDB Replica Set metrics (members, ping, replication lag, etc)
  • MongoDB Replication Oplog metrics (size, length in time, etc)
  • MongoDB Sharding metrics (shards, chunks, db/collections, balancer operations)
  • MongoDB RocksDB storage-engine metrics (levels, compactions, cache usage, i/o rates, etc)
  • MongoDB WiredTiger storage-engine metrics (cache, blockmanger, tickets, etc)

Building and running

Building

make

Running

To define your own MongoDB URL, use environment variable MONGODB_URL. If set this variable takes precedence over -mongodb.uri flag.

To enable HTTP basic authentication, set environment variable HTTP_AUTH to user:password pair. Alternatively, you can use YAML file with server_user and server_password fields.

export MONGODB_URL='mongodb://localhost:27017'
export HTTP_AUTH='user:password'
./mongodb_exporter <flags>

Flags

See the help page with -h.

If you use MongoDB Authorization, you must:

  1. Create a user with 'clusterMonitor' role and 'read' on the 'local' database, like the following (replace username/password!):
db.getSiblingDB("admin").createUser({
    user: "mongodb_exporter",
    pwd: "s3cr3tpassw0rd",
    roles: [
        { role: "clusterMonitor", db: "admin" },
        { role: "read", db: "local" }
    ]
})
  1. Set environment variable MONGODB_URL before starting the exporter:
export MONGODB_URL=mongodb://mongodb_exporter:s3cr3tpassw0rd@localhost:27017

Note about how this works

Point the process to any mongo port and it will detect if it is a mongos, replicaset member, or stand alone mongod and return the appropriate metrics for that type of node. This was done to preent the need to an exporter per type of process.

Roadmap

  • Document more configurations options here
  • Stabilize RocksDB and WiredTiger support (currently beta/experimental)
  • Move MongoDB user/password/authdb to a file (for security)
  • Write more go tests
  • Version scheme

Submitting Bug Reports

If you find a bug in Percona MongoDB Exporter or one of the related projects, you should submit a report to that project's JIRA issue tracker.

Your first step should be to search the existing set of open tickets for a similar report. If you find that someone else has already reported your problem, then you can upvote that report to increase its visibility.

If there is no existing report, submit a report following these steps:

  1. Sign in to Percona JIRA. You will need to create an account if you do not have one.
  2. Go to the Create Issue screen and select the relevant project.
  3. Fill in the fields of Summary, Description, Steps To Reproduce, and Affects Version to the best you can. If the bug corresponds to a crash, attach the stack trace from the logs.

An excellent resource is Elika Etemad's article on filing good bug reports..

As a general rule of thumb, please try to create bug reports that are:

  • Reproducible. Include steps to reproduce the problem.
  • Specific. Include as much detail as possible: which version, what environment, etc.
  • Unique. Do not duplicate existing tickets.
  • Scoped to a Single Bug. One bug per report.

mongodb_exporter's People

Contributors

aleksi avatar dbmurphy avatar timvaillancourt avatar rnovikovp avatar roman-vynar avatar evgeniypatlan avatar delgod avatar ese avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.