Mongo Asserts Test

Assertions are errors that may occur on a MongoDB server from time to time. Administrators need to promptly capture these errors and understand their nature, so that they can rapidly resolve them and prevent any negative impact on database performance. This is where the Mongo Asserts test helps. This test captures and reports the rate at which each type of assertion occurs on a monitored MongoDB server. Using these metrics, administrators can instantly capture the asserts/errors, quickly determine from the assert type why the error might have occurred, and then, rapidly initiate the appropriate corrective measures.

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 Mongo database 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.

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

Regular asserts

Defines the rate at which regular asserts occurred on the monitored MongoDB server.

Asserts/Sec

Regular asserts are per-operation variants (eg., "unexpected failure while reading a BSON document").

Ideally, the value of this measure should be 0. If a non-zero value is reported, check the log file for more information.

Warning asserts

Indicates the rate at which warning asserts occurred on the monitored MongoDB server.

Asserts/Sec

Warning asserts are not as serious as errors. They just indicate conditions that might be worth checking like too low ulimit or readahead.

Ideally, the value of this measure should be 0. If a non-zero value is reported, check the log file for more information.

Message asserts

Indicates the rate at which message asserts occurred on the monitored MongoDB server.

Asserts/Sec

Message asserts indicate internal server exceptions.

Ideally, the value of this measure should be 0. If a non-zero value is reported, check the log file for more information.

User asserts

Indicates the rate at which user asserts occurred on the monitored MongoDB server.

Asserts/Sec

User asserts are triggered as the result of user operations or commands generating an error like a full disk space, a duplicate key exception, or write errors (e.g. insert not properly formatted, or no access right). These errors are returned to the client so most of them won’t be logged into the mongod logs. However you should investigate potential problems with your application or deployment.

Both regular and user asserts will result in the corresponding operation failing.

Rollover asserts

Indicates the rate at which rollover alerts occurred on the target MongoDB server.

Asserts/Sec

The number of times that the rollover counters have rolled over since the last time the MongoDB process started. The counters will rollover to zero after 230 assertions. Use this value to provide context to the other values reported by the test.