Mongo Tickets Test
Tickets are an internal representation for thread management. WiredTiger uses tickets to control the number of read/write operations simultaneously processed by the storage engine. The default value is 128 and works well for most cases. This count can be fine-tuned depending upon the workload of MongoDB.
If sufficient tickets are not available for processing read/write requests, it can reduce concurrency and cause request processing to slow down on the MongoDB server, thus scarring user experience with the server. If this is to be avoided, then administrators should periodically check ticket usage and detect a ticket crunch well before it impacts database performance or UX. This can be achieved using the Mongo Tickets test. This test monitors how the MongoDB server uses the read and write tickets allotted to it and warns administrators of a probable contention for processing power. This way, the test enables administrators to optimize its ticket configuration, so that concurrency is not compromised and critical processing resources are also conserved.
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.
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. |
CA PEM File |
A .pem file is a container that may just include the public certificate or the entire certificate chain (private key, public key and root certificates). If the connection requires server authentication and the server certificate is in the .pem format, then, the target instance presents the CA PEM File that contains the server certificate to its clients to establish the instance's identity. Therefore, you should specify the full path to the CA PEM file available in the target MongoDB server in the CA PEM File text box. For example, the location of this file may be: C:\app\openSSL\SSLcert\test-ca.pem. |
Client PEM File |
If the target instance requires a certificate key file that is in .pem format from the client to verify the client's identity, then, to establish a connection with the target server, the eG agent should access the client certificate. For this, specify the full path to the Client PEM file in the Client PEM File text box. For example, the location of this file may be: C:\app\openSSL\SSLcert\test-client.pem. |
CA Cert File |
This parameter is applicable only if the target MongoDB server is SSL-enabled and CA PEM File parameter is set to none.The certificate file is a public-key certificate following the x.509 standard. It contains information about the identity of the server, such as its name, geolocation, and public key. Essentially, it’s a certificate that the server serves to the connecting users to prove that they are what they claim to be. Therefore, specify the full path to the server root certificate or certificate file that is signed by the CA in .crt file format for the server in the CA Cert File text box. For example, the location of this file may be: C:\app\eGurkha\JRE\lib\security\mongodb-test-ca.crt. By default, this parameter is set to none. |
Client Cert File |
This parameter is applicable only if the target MongoDB server is SSL-enabled and Client PEM File parameter is set to none.In order to collect metrics from the target MongoDB, the eG agent requires client certificate in .p12 format. Hence, specify the full path to the Client certificate file in .p12 format in the Client Cert File text box. For example, the location of this file may be: C:\app\eGurkha\JRE\lib\security\test-client.p12 . To know how to generate .p12 file from Client PEM file, refer to How to import a Certificate that is in the PEM Format? By default, this parameter is set to none. |
Client Cert Password |
Provide the password for .p12 Client certificate file in the Client Cert Password text box. |
AWS Key ID, AWS Secret Key,Confirm Password |
If you are monitoring MongoDB server hosted on the AWS cloud, the eG agent has to be configured with the AWS AccessKey ID and Secret Key to connect with the AWS cloud and collect the required metrics. Therefore, Specify the AWS Key ID and AWS Secret Key and confirm the password by re-typing it in the Confirm Password text box. To obtain the AWS Access key and secret key, refer toObtaining AWS Access Key and Obtaining AWS Secret Key. |
Atlas URI |
MongoDB Atlas is a NoSQL Database-as-a-Service offering in the public cloud. If the target MongoDB server is deployed and managed in MongoDB Atlas, then the eG agent has to be configured with the MongoDB Atlas connection URI,a unique identifier for connecting to a MongoDB server, in the Atlas URI text box to access the target MongoDB server hosted on Atlas and collect the required metrics. |
Measurement | Description | Measurement Unit | Interpretation |
---|---|---|---|
Total read tickets |
Indicates the maximum number of read tickets the target server can use. |
Number |
|
Used read tickets |
Indicates the number of read tickets currently used. |
Number |
If the value of this measure is equal to or close to the value of Total read tickets measure, it is a cause for concern. |
Available read tickets |
Indicates the number of read tickets currently unused. |
Number |
If the value of this measure is equal to or close to 0, it is a cause for concern. |
Read ticket usage |
Indicates the percentage of read tickets currently in use. |
Percent |
A value close to 100% indicates that the server is about to run out of read tickets. This can cause subsequent read requests to be queued, waiting for tickets. Consequently, read request processing will slow down. One of the common causes for this is long-running read operations. Such operations typically hold on to read tickets without releasing them for long periods of time, thus reducing concurrency. Terminating such read operations can help free tickets. Alternatively, you can increase the maximum number of read tickets the server can use by modifying the wiredTigerConcurrentReadTransactions setting. However be careful when increasing it: if the number of simultaneous operations gets too high, you might run out of system resources (CPU in particular). Scaling horizontally by adding more shards can help to support high throughputs. |
Total write tickets |
Indicates the maximum number of write tickets the target server can use. |
Number |
|
Used write tickets |
Indicates the number of write tickets currently used. |
Number |
If the value of this measure is equal to or close to the value of Total write tickets measure, it is a cause for concern. |
Available write tickets |
Indicates the number of write tickets currently unused. |
Number |
If the value of this measure is equal to or close to 0, it is a cause for concern. |
Write ticket usage |
Indicates the percentage of write tickets currently in use. |
Percent |
A value close to 100% indicates that the server is about to run out of write tickets. This can cause subsequent write requests to be queued, waiting for tickets. Consequently, writerequest processing will slow down. One of the common causes for this is long-running write operations. Such operations typically hold on to write tickets without releasing them for long periods of time, thus reducing concurrency. Terminating such write operations can help free tickets. Alternatively, you can increase the maximum number of write tickets the server can use by modifying the wiredTigerConcurrentWriteTransactions setting. However be careful when increasing it: if the number of simultaneous operations gets too high, you might run out of system resources (CPU in particular). Scaling horizontally by adding more shards can help to support high throughputs. |