Download PDF
Download page Configure MongoDB Collectors.
Configure MongoDB Collectors
To monitor MongoDB with Database Visibility, you must run MongoDB >= 2.6.
If you are configuring a collector for a MongoDB cluster, you only need to configure one collector for the entire cluster. You can choose any node in the cluster to connect to, and the entire cluster will automatically be detected.
Connection Details
Section | Field | Description |
---|---|---|
Create New Collector | Database Type | The database type that you want to monitor. |
Agent | The Database Agent that manages the collector. | |
Collector Name | The name you want to identify the collector by. | |
Connection Details | Hostname or IP Address | The hostname or IP address of the machine that your database is running on. |
Listener Port | The TCP/IP address of the port on which your database communicates with the Database Agent | |
Custom Connection String | The connection string generated by the database agent. You can also specify a custom connection string, which is useful for setting custom authentication options. Ensure that you do not specify the username and password in the custom connection string because it can cause a security risk. | |
SRV Record | Enable this field to use the SRV record, where the connection string includes mongodb+srv . | |
Username and Password | Username | The name of the user who is connecting to and monitoring the database through the Database Agent. The user should have the permissions described in User Permissions for MongoDB. |
Password | The password of the user who is connecting to and monitoring the database through the Database Agent. | |
CyberArk | Click to enable CyberArk for database username and password. When CyberArk is enabled, information about Application, Safe, Folder, and Object is required to fetch the username and password for your database. To use CyberArk with Database Visibility, you must download the JavaPasswordSDK.jar file from the CyberArk web site and rename the file to cyberark-sdk-9.5.jar . Then, you must copy the JAR file to the lib directory of the database agent zip file. | |
Advanced Options | SSL Connection | Click to enable SSL Connection:
If you also use client certificate authentication, then click the Enable SSL Client Authentication box.
You can set the context protocol for the SSL environment by using the following system variable:
CODE
If you do not set the context protocol through the system variable, TLSv1.3 is used by default. These platforms support TLSv1.3:
If a JDK version does not support TLSv1.3 or the specified context protocol, Splunk AppDynamics switches to TLSv1.2. |
Exclude Databases | The databases that you want to exclude, separated by commas. | |
Monitor Operating System | See Configure the Database Agent to Monitor Server Hardware. |
When configuring the collector, ensure that you encode the username and password that uses special characters.
User Permissions for MongoDB
For MongoDB < 2.6.x, the readAnyDatabase and ClusterMonitor built-in roles are required to monitor using Splunk AppDynamics Database Visibility. For MongoDB shared clusters, the monitoring user must have access to all shards.
For MongoDB >= 2.6, the clusterMonitor
built-in role in addition to read is required.
If you choose to create a new user to monitor MongoDB, the user must be created in the admin database.
You can configure user roles as shown in the sample query below:
use admin
db.createUser({ user: "tanujaAdmin",
pwd: "tanuja123",
roles: [
{ role: "clusterMonitor", db: "admin" },
{ role: "read", db: "admin" },
]
})