Coder Social home page Coder Social logo

collectd-mongodb's Introduction

Introduction

collectd-mongodb is a collectd plugin that collects statistics from a MongoDB server.

This plugin is a direct port of the MongoDB C plugin that will be part of collectd 5.1, it works with Collectd 4.9.x and 4.10.x.

Requirements

Configuration

The plugin has some configuration options even though none are mandatory. This is done by passing parameters via the config section in your Collectd config. The following parameters are recognized:

  • User - the username for authentication
  • Password - the password for authentication
  • Host - hostname or IP address of the mongodb server defaults to 127.0.0.1
  • Port - the port of the mongodb server defaults to 27017
  • Database - the databases you want to monitor defaults to "admin". You can provide more than one database. Note that the first database must be "admin", as it is used to perform a serverStatus()

The following is an example Collectd configuration for this plugin:

<LoadPlugin python>
    Globals true
</LoadPlugin>

<Plugin python>
    # mongodb.py is at path /opt/collectd-plugins/mongodb.py
    ModulePath "/opt/collectd-plugins/"

    Import "mongodb"
    <Module mongodb>
        Host "127.0.0.1"
        Password "password"
        Database "admin" "db-prod" "db-dev"
    </Module>
</Plugin>

The data-sets in types.db need to be added to the types.db file given by the collectd.conf TypesDB directive. See the types.db(5) man page for more information.

If you're monitoring a secured MongoDB deployment, declaring a user with minimal read-only roles is a good practice, such as :

db.createUser( {
  user: "collectd",
  pwd: "collectd",
  roles: [ { role: "readAnyDatabase", db: "admin" }, { role: "clusterMonitor", db: "admin" } ]
});

collectd-mongodb's People

Contributors

cep21 avatar epheatt avatar jbarber avatar marsup avatar sebest avatar wingzero21 avatar

Watchers

 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.