Mongo Logs Test

The MongoDB logs are a vast source of information related to errors and warnings that a MongoDB server encounters. Administrators use these log files not only to spot problem conditions, but also to troubleshoot them. By periodically scanning the MongoDB error log for errors/warnings, the Mongo Logs test promptly notifies administrators as soon as a new error, warning, or fatal error is logged in the file. Detailed diagnostics of the test clearly indicate what error it is and when it occurred, so as to aid troubleshooting efforts.

As messages keep getting logged in the log files, these log files grow large in size. If log file growth is left unchecked, it can consume all available space in the database. Administrators can effectively tracklog file growth and initiate measures to control it using the Mongo Logs test. The test reports the current size of the log files and their growth rate, and proactively alerts administrators if the rate of growth is abnormal.

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 MongoDB server 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.

File Path

Specify the full path to the log file that is to be read by the test to pull out the metrics. For example, the full path can be specified as: /C:\Program Files\MongoDB\Server\6.0\log\mongod.log. By default, none is specified against this text box.

ISUTF 16

Set this flag to Yes, if the test needs to use the UTF-16 encoding format for reading the specified log files. By default, this flag is set to No.

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.

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Errors

Indicates the number of error messages logged in the log files during the last measurement period.

Number

Ideally, the value of this measure should be 0.

If a non-zero value is reported, you can use the detailed diagnosis of this measure to know what error occurred and when.

Fatal errors

Indicates the number of fatal errors captured by the log files during the last measurement period.

Number

Ideally, the value of this measure should be 0.

If a non-zero value is reported, you can use the detailed diagnosis of this measure to know what error occurred and when.

Warning messages

Indicates the number of warning messages logged in the log files during the last measurement period.

Number

Ideally, the value of this measure should be 0.

If a non-zero value is reported, you can use the detailed diagnosis of this measure to know what error occurred and when.

File size

Indicates the current size of the log file.

MB

Growth rate

Indicates the rate at which the log file is growing.

MB/Sec

A high value for this measure or a consistent increase in its value indicates that the Mongo log is rapidly growing and may end up occupying too much space on the volume.