Configuring a MongoDB environment
This topic provides information about configuring the MongoDB monitor type by using the TrueSight console. The MongoDB monitor type is used to monitor the MongoDB database computers. The MongoDB monitor type can be configured to monitor the MongoDB database MongoS parameters, MongoDB cluster parameters, and the replica set member parameters.
Configuring the MongoDB monitor type
In the Add Monitor Types dialog box, with the Monitoring Profile set to MongoDB Monitoring, and the Monitor Type set to MongoDB, provide the following details:
|Java home||Specify the path of the Java home.|
|Data collection logging|
Select the check box to turn ON the PSL debug at a global level.
|MongoDB Environment||Enter the name for the MongoDB database environment.|
|Host Name||Enter the host name or IP number that you want to monitor.|
|Port Number||Enter the port number of the instance that you want to monitor.|
|Excluded DBs||Enter the MongoDB databases that you want to exclude from monitoring. Separate the databases by using a semicolon (;), comma (,), or space.|
|Username||Enter the username to connect to the database.|
|User Password||Enter the password to connect to the database.|
When using authentication the user needs to have read privilege to admin and local databases at all Mongo components.
In case, if the MongoDB is a cluster then the user needs to have ClusterMonitor for admin DB as well.
|Trust store certificate file|
Enter the path to the directory where the Trust Store certificates are located. The input to this field is the full path of JKS file.
|Trust store Password||Enter the Trust Store Password.|
|Key store file||Enter the path to the directory where the Key Store certificates are located.|
|Key store password||Enter the Key Store Password.|
The following steps involved in generating the jks file:
1. Create the key and crt files of ssl connection:
“-openssl req -new -x509 -days 365 -nodes -out selfsigned-cert.crt -keyout selfsigned-cert.key”
openssl.exe req -new -x509 -days 365 -nodes -out selfsigned-cert.crt -keyout selfsigned-cert.key
2. Create the .p12 file from the generated key and crt files:
“-openssl pkcs12 -export -in [path to certificate] -inkey [path to private key] -certfile [path to certificate ] -out [p12 file name]”
openssl.exe pkcs12 -export -in selfsigned-cert.crt -inkey selfsigned-cert.key -certfile selfsigned-cert.crt -out testkeystore.p12
3. Generate the jks file using java keytool (from "%JAVA_HOME%\bin"):
“-keytool -importkeystore -srckeystore testkeystore .p12 -srcstoretype pkcs12 -destkeystore %myJksFile %.jks -deststoretype JKS”
This example generates myJksFile.jks file.
|Discovery Interval (mins)||Specify the time interval between discovery cycles, in minutes.|
|ReplicaSet member to device||Select to display each host separately. Instance to Device is enabled by default.|
|Data collection logging||Select the check box to turn the logging on or off for the MongoDB environment you want to configure. By default, the data collection logging is turned off.|
|Select one or more from the list of parameters to enable monitoring the MongoS parameters.|
|Select one or more from the list of parameters to enable monitoring the cluster parameters.|
|Select one or more from the list of parameters to enable monitoring the database parameters.|
|Select one or more from the list of parameters to enable monitoring the Replica Set Member parameters|
Long running operations filter
|Long running time (sec)|
Specify the long running operations period in seconds. By default, the time is 60 sec.
If Operation and NameSpace are empty, it fetches for ALL operations that are running more than the set time.
|Filter action||Specify the Include or Exclude filter operation. Include is selected by default.|
|Namespace list||Specify the namespace that you want to exclude from monitoring. Separate the list by using a semicolon (;), comma (,), or space. By default, it is user;analytics.|
For example, user,analytics
Specify the operations that you want to exclude from monitoring. Separate the list by using a semicolon (;), comma (,), or space. By default, it specifies the field with the query.
For example, query,insert
After you have completed configuring the environment, click OK to add this to the environment configurations list and save the policy. This environment is displayed on the Environment Configuration list.
Click Cancel to exit without saving any changes.