Mongo Connectivity Test

Availability of the MongoDB server and its responsiveness to client requests is crucial to the high uptime and optimum performance of the critical business applications that use that server. If the MongoDB server is inaccessible or does not respond to requests quickly, the performance of the business applications/services that rely on the server will suffer. To avoid service downtime/slowness, the database administrator should promptly detect the unavailability or poor responsiveness of the MongoDB server and also accurately pinpoint the root-cause of the anomaly - is it because the MongoDB server is down? is it because of a broken or latent network connection to the server? is it because the collection that the user is trying to access is unavailable? or is document retrieval from the collection taking a long time? The Mongo Connectivity test helps with this.

This test periodically checks whether/not the MongoDB server is up and running, verifies network connectivity to the server, and also measures the connection time. In addition, the test also emulates a MongoDB API call to a specified collection on the server for retrieving documents from it; in the process, the test reports collection availability and the time taken to read the documents. This way, the test alerts administrators to the non-availability and poor responsiveness of the server, and also points them to where exactly the bottleneck is.

Target of the test : A MongoDB server

Agent deploying the test : An internal/remote agent

Outputs of the test : One set of results for the server being monitored

Configurable parameters for the test
Parameter Description

Test period

How often should the test be executed

Host

The host for which the test is to be configured.

Port

The port number at which the specified host listens

Database Name

The test connects to a specific Mongo database to run API commands and pull metrics of interest. Specify the name of this database here. The default value of this parameter is admin.

Username and Password

The eG agent has to be configured with the credentials of a user who has the required privileges to monitor the target MongoDB instance, if the MongoDB instance is access control enabled. To know how to create such a user, refer to How to monitor access control enabled MongoDB database?. If the target MongoDB instance is not access control enabled, then, specify none against the Username and Password parameters.

Confirm Password

Confirm the password by retyping it here.

Collection Name

A collection is the equivalent of an RDBMS table, which exists within a single database. A collection contains MongoDB documents. This test emulates a MongoDBI API call to a collection, and attempts to read the documents contained within. In the process, the test captures the collection availability and the time taken by the document read/retrieval operation. To enable this emulation, specify the name of the collection that you want the test to access, in the COLLECTION NAME text box. Your specification should be of the following format: <Namespace>.<collection name>. The default value of this parameter is system.indexes.

Authentication Mechanism

Typically, the MongoDB supports multiple authentication mechanisms that users can use to verify their identity. In environments where multiple authentication mechanisms are used, this test enables the users to select the authentication mechanism of their interest using this list box. By default, this is set to None. However, you can modify this settings as per the requirement.

SSL

By default, the SSL flag is set to No, indicating that the target MongoDB server is not SSL-enabled by default. To enable the test to connect to an SSL-enabled MongoDB server, set the SSL flag to Yes.

CA File

A certificate authority (CA) file contains root and intermediate certificates that are electronically signed to affirm that a public key belongs to the owner named in the certificate. If you are looking to monitor the certificates contained within a CA file, then provide the full path to this file in the CA File text box. For example, the location of this file may be: C:\cert\rootCA.pem. If you do not want to monitor the certificates in a CA file, set this parameter to none.

Certificate Key File

A Certificate Key File specifies the path on the server where your private key is stored. If you are looking to monitor the Certificate Key File, then provide the full path to this file in the Certificate Key File text box. For example, the location of this file may be: C:\cert\mongodb.pem. If you do not want to monitor the certificates in a CA file, set this parameter to none.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

Server availability

Indicates whether/not the MongoDB server is up and running.

Percent

The availability is 100% when the server is responding to a request and 0% when it is not. Availability problems may be caused by a misconfiguration / malfunctioning of the database server, or because the server has not been started. Besides the above, this measure will report that the server is unavailable even if a connection to the database instance is unavailable, or if an attempt to retrieve documents from the configured collection fails. In this case, you can check the values of the  Connection availability and Document availability measures to know what is exactly causing the database instance to not respond to requests - is it owing to a connection unavailability? or is it due to the collection unavailability?

Server response time

Indicates the time taken by the server to respond to a user request.

Secs

A sudden increase in response time is indicative of a bottleneck at the database server.

Connection availability

Indicates whether the database connection is available or not.

Percent

If this measure reports the value 100 , it indicates that the database connection is available.  The value 0 on the other hand indicates that the database connection is unavailable. A connection to the database may be unavailable if the database is down or if the database is listening on a port other than the one configured for it in the eG manager or owing to a poor network link. If the Server availability measure reports the value 0, then, you can check the value of this measure to determine whether/not it is due to the unavailability of a connection to the server.

Connection response time

Indicates the time taken by the database connection.

Secs

A high value could indicate a connection bottleneck. Whenever the Server response time of the measure soars, you may want to check the value of this measure to determine whether a connection latency is causing the poor responsiveness of the server.

Collection availability

Indicates whether/not the configured Collection Name is available.

Percent

If this measure reports the value 100, it indicates that the Collection Name you have configured for this test is available.  The value 0 on the other hand indicates that the collection is unavailable.

Collection response time

Indicates the time taken to read documents from the configured Collection Name.

Secs

A high value could indicate an I/O bottleneck on the server. If the Server response time measure is unusually high, you may want to check the value of this measure to figure out if a bottleneck when reading from a collection is impacting responsiveness.

Number of documents

Indicates the number of documents fetched from the configured Collection Name.

Number