You are here

Integrations

Database - MongoDB

Included in Opsview Monitor 5.4
check_circle
Opsview Supported
by Genaro Bedenko

MongoDB Opspack

MongoDB is a cross-platform, document-oriented database program and represents its documents in a binary-encoded JSON format called BSON (Binary JSON). The lightweight binary format adds speed to the flexibility of the JSON format, along with more data types. Fields inside MongoDB documents can also be indexed.

Mongo DB allows users to be agile and follow a stable process when running the most critical applications. Here are a few other highlight features:

  • Expressive query language & secondary indexes
  • Enterprise management and integration
  • Strong consistency
  • Always-on global deployments

What You Can Monitor

Opsview Monitor contains all the important service checks to make sure your MongoDB Server is up and running. Service Checks for MongoDB include:

  • CPU information for all of your MongoDB instances
  • Memory statistics including MongoDB_config and arbiter
  • Page Faults, database size, replication state and more

Service Checks

Service Check
asserts
chunks_balance
collection_indexes
collection_size
collection_state
collection_storageSize
connect_primary
connections
database_indexes
database_size
databases
flushing
index_miss_ratio
journaled
journal_commits
last_flush_time
memory
memory_mapped
opcounters
oplog
page_faults
queries_per_second
queues
replication_lag
replication_lag_percent
replset_quorum
replset_state
row_count
write_data_files

Setup and Configuration

Download and install required packages

Pymongo is required to run this plugin and can be installed on your system by running: - apt-get install python-pip - pip install pymongo

This will install the latest version of pymongo to your system.

Setup for using all service checks

To get all the service checks working correctly, MongoDB must be set up with a database, collection, sharding and replicaset. Any of the service checks that are not needed should be disabled.

If you are not running sharding, then Chunks Balance should be disabled.

If MongoDB is running without replSet, then Rep Lag, Rep Lag percentage, Replset Quorum and Replset State should be disabled.

If you are running a MongoDB 3.2+ system, then Journal, Journal Commits and Write Data Files should be disabled as it uses WiredTiger as its storage engine.

Create a user with appropriate role for plugin to login as with MongoDB

In order for this Opspack to work, it queries the admin database to get system-wide statistics about the database deployment.

It is recommended to set up a user in a role with permissions (at least) 'ClusterMonitor', as this role "Provides read-only access to monitoring tools for administering the whole system rather than just a single database".

For example, to create a user 'Opsview' with password 'Opsview' and role 'clusterMonitor':

  • db = db.getSiblingDB("admin");
  • db.createUser( { user:"opsview",pwd:"opsview",roles:["clusterMonitor"] } );

The Opspack can then use these credentials, which you enter into Opsview, to login and query metrics.

You are at liberty to instead allow Opsview to login as an already existing user with at least this level of role access.

To configure and utilize this Opspack, you simply need to add the 'Database - MongoDB' Opspack to your Opsview Monitor system.

Step 1: Add the host template

Add host template

Step 2: Add and configure variables required for this host

Add variables

Step 3: Reload and the system will now be monitored

View Service Checks

v1.0-opsview-6

ODI-1154 Release Opspacks for Opsview Monitor 6.0

Initial release of Opspack to work with Opsview Monitor 6.0

v1.0-opsview-5

ODI-6 - MongoDB Opspack

Initial release for MongoDB Opspack