MongoDB Monitoring User Guide

General information

Overview

MongoDB monitoring is a Gateway configuration file that enables monitoring of MongoDB through the Toolkit plug-in.

MongoDB can monitor the database environment in a measurable way to spot any potential discrepancies and issues.

Some key areas to track when using MongoDB monitoring:

Key Area Description
Metrics Determine the crucial alerts to be set in the metrics to avoid any performance issues or errors.
Database performance Monitor the database's current state.
Resource utilisation Monitor the number of client connections to avoid abnormal traffic loads that can lead to performance issues.
Asserts Show errors raised during the selected time period.
   

 

MongoDB helps you to get an overview of database operations, such as:

  • Track the current state of database.
  • View reports of asserts on the database.
  • Monitor the metrics for write performance.
  • View contains storage statistics for a given database.
  • Check reports information regarding the state and use of indexes in MongoDB.

This guide discusses the steps to set up the MongoDB integration on a Gateway. Once the integration is set up, the samplers providing the dataviews become available to that Gateway.

To view the sample metrics and dataviews, see MongoDB Monitoring Technical Reference.

User requirements

This monitoring template is a Gateway configuration setup that can be included in the Gateway Setup Editor.

To use this template, your configuration must meet the following requirements:

  • A machine running the Netprobe must have access to the MongoDB published HTTP address and port.
  • An Active Console 2 that is connected to the Gateway.
  • MongoDB configuration files extracted to their Gateway set-up.

System Requirements

The following requirements must be met prior to the installation and setup of the template:

  • Template package: geneos-integration-mongoDB-<version>.zip.
  • Managed entities utilising the samplers defined in the include/MongodbMonitoring.xml.
  • Netprobe version 4.5.

Audience

This document is a reference guide to introduce templates and scripts built using the Geneos development toolkit plug-ins.The template allows you to integrate specific applications and services to collect metrics without having to create a new plug-in..

 

Install and set up

Ensure that you have read and can follow the system requirements prior to installation and setup of this integration template.

  1. Download the config file (geneos-integration-mongoDB-<version>.zip) from the ITRS Downloads site.
  2. Open Active Console 2.
  3. Extract the file into the Gateway Setup directory.
  4. In the Navigation panel, click Includes to create a new file.
  5. Enter the location of the file to include in the Location field. In this example, use the include/mongoDBMonitoring.xml:
  6. The priority controls the importance of a file when merging. Sections in a higher priority file will take precedence over sections in a lower priority file. This priority setting affects the priority of configuration in the main setup file.

  7. Expand the file location in the Includes section.
  8. Select Click to load...
  9. Click Yes to load the new MongoDB include file.
  10. Click Managed entities in the Navigation panel.
  11. Add the MongoDB type to the Managed Entity section that you will use to monitor MongoDB.
  12. Click the Validate button to check your configuration.

The Validate button allows you to check if there are any errors or warnings in your configuration set-up.

Once the Gateway configuration appears in the Includes section, you can add the samplers and other variables.

 

Set up the samplers

These are the pre-configured samplers available to use in MongoDBMonitoring.xml.

Configure the required fields by referring to the table below:

Samplers
MongoDB-dbStats
MongoDB-Locks
MongoDB-Memory
MongoDB-BackgroundFlushing
MongoDB-Opcounters
MongoDB-Asserts
MongoDB-Instance
MongoDB-Cursors
MongoDB-ConcurrentTransactions
MongoDB-Replication
 

Set up the variables

The MongoDBMonitoring.xml template provides the following variables that are set in the Environments section:

Variables Description
MONGODB_SAMPLE_INTERVAL Sample interval used by all the Mongo samplers.
MONGODB_CLIENT Full path of the Mongo client. The toolkit script uses this to communicate with the MongoDB instance.
MONGODB_GROUP Group name used by all the Mongo Samplers.
MONGODB_CONNECTION

Follow the format <host>:<port>

  • Host is the machine where mongod or mongos is running .
  • Port is where it is listening to.
MONGODB_SCRIPT_DIR Directory where the sampler scripts will be generated.
MONGODB_DB Specifies the name of the database to connect to.
   

Note: The default values can be changed by providing an environment named Mongo with a higher priority in the set-up file, or by using an environment in the Managed entity where the type is defined.

After checking and saving the changes, the samplers you have set in the Gateway configuration display in Active Console 2.

 

Set up the rules

The MongoDBMonitoring-SampleRules.xml template also provides a separate sample rules that can be used to configure the Gateway Setup Editor.

Your configuration rules must be set in the Includes section.

  1. Enter the location of the file to include in the Location field. In this example, use the include/MongoDBMonitoring-SampleRules.xml:
  2. Note: The priority controls the importance of a file when merging. Sections in a higher priority file will take precedence over sections in a lower priority file. This priority setting affects the priority of configuration in the main setup file.

  3. Expand the file location in the Includes section.
  4. Select Click to load...
  5. Click Yes to load the new MongoDB include rules file.
  6. Click Rules in the Navigation panel to create new rules.
Sample Rules
MongoDB-Asserts
MongoDB-CursorsWithTimeout
MongoDB-TicketAvailability
MongoDB-ReplicaState
MongoDB-ReplicationLag
 

Once the Gateway for rules configuration appears in the SampleRules Includes section, you can set the rules and alerts.