HomeMongoDB Monitoring
MongoDB Monitoring

MongoDB is a free and open-source, cross-platform document-oriented database program that provides high performance, high availability, and automatic scaling. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas. Nodelizer helps you to monitor following metric about MongoDB installed on your server.

Metrics collected by MongoDB Integration
Metric
– Description
Uptime
– The amount of time the current MongoDB process has been active.
Resident Memory
– The amount of RAM currently used by the database process.
Virtual Memory
– The quantity of virtual memory used by the mongod process.
Mapped Memory
– The amount of mapped memory by the database.
Current Connections
– The number of incoming connections from clients to the database server. This number includes the current shell session.
Available Connections
– The number of unused incoming connections available.
Heap Usage
– The total size in bytes of heap space used by the database process.
Page Faults
– The total number of page faults.
Insert
– Number of insert operations received per second.
Query
– Number of queries received per second.
Update
– Number of update operations received per second.
Delete
– Number of delete operations per second.
GetMore
– Number of “getmore” operations per second.
Command
– Number of commands issued to the database per second. (All commands except the write commands: insert, update & delete.)
Back Flushes
– The number of times the database has flushed all writes to disk.
Avg BackFlush Time
– The average time in milliseconds for each flush to disk, calculated by dividing total_ms by flushes.
Last BackFlush Time
– The amount of time, in milliseconds, that the last flush operation took to complete.
Open Cursors
– The number of cursors that MongoDB is maintaining for clients.
Bytes In
– The rate of amount of network traffic received by this database.
Bytes Out
– The rate of amount of network traffic sent from this database.
Configuring

rptmonitor uses PyMongo module working with MongoDB.

  1. Check if you have PyMongo installed :

    • To open the python prompt in terminal, just type : python
    • Inside python prompt : import pymongo
    • If PyMongo isn’t installed, you will get this error :

      ImportError: No module named pymongo

    • Note : If is installed, make sure that installed version is at least 2.1 as older version do not support some features. Try : pymongo.version
  2. Installing Pymongo :

    • Using pip : pip install pymongo (python2) & pip3 install pymongo (python3)
    • Using easy_install : easy_install pymongo
    • From source :

      git clone git://github.com/mongodb/mongo-python-driver.git pymongo

      cd pymongo/

      python setup.py install

    • ‘pip’ is preferred installer program.

      Note : Installing pip on CentOS / RHEL / Ubuntu / Debian

  3. Edit the Agent’s config.cfg :

    • Fill in values for variables & uncomment the lines containing these variables (remove # symbol) –
    • mongodb_server
    • mongodb_dbnm, if not configured, default will be ‘admin‘.
    • mongodb_usrnm
    • mongodb_pswd
    • You can also customize port if not running the default, through mongodb_port config variable.
  4. Restart the Monitor :

    • For (deb/rpm)package supported Linux distros :

      sudo /etc/init.d/rptmonitor restart
    • For openSUSE(11.4+) with systemd :

      sudo systemctl restart rptmonitor.service
    • For other Linux distro, FreeBSD8+, Mac OS X+ :

      sudo python /usr/local/bin/rptmonitor/monitor.py restart