Learn how to create QuerySurge Connections to MongoDB databases
Configuring QuerySurge Connections: MongoDB
When you create a QuerySurge Connection, the Connection Wizard will guide you through the process. Different types of QuerySurge connections require different types of information.
For a MongoDB Connection, you will need the following information (check with a DBA or other knowledgeable resource in your organization):
· Database login credentials (ID and Password)
· Server Name or IP address of the MongoDB Server
· The port for your MongoDB database (27017 is the default port)
· The MongoDB database name.
· The Max String Width for your data (the largest size that string data types can have in your data set).
Important Note: QuerySurge MongoDB connections require a MongoDB JDBC driver. The Unity MongoDB JDBC driver (a commercial third-party driver that is not bundled with QuerySurge) is an option. See www.unityjdbc.com/mongojdbc/mongo_jdbc.php for driver and licensing information.
Launch the Connection Wizard
1. Log into QuerySurge as an Admin user.
2. To configure a Connection, select Configuration > Connections in the Administrative View tree (at the left).
3. Click on the Add button at the bottom left of the page to launch the Connection Wizard. Click Next.
4. Provide a name for your connection. Select MongoDB Unity Driver as the Data Source. Click Next.
5. Once you have selected your Data Source, the Wizard will tell you what information you are likely to need in order to create your Connection. Once you have collected this information, you are ready to click Next.
6. Provide the connection information to your database. This includes the Server name or IP address, the port (the default port for your database product will automatically populate), and the MongoDB database name. Login credentials are optional. Click Next.
Required fields for your Connection are marked by an *.
7. Check the Max String Width. This value is dependent on your data, and is the largest size that string data types can have in your data set. The default is 500 B. Modify the value as needed.
8. Enter an optional Test Query for the test connection. A test query should bring back a few rows reliably, and is used simply to show connectivity between the Agent and MongoDB.
9. Click on Test Connection. This option will only be enabled if you entered a Test Query.
Note: You must have an Agent running with the driver for this Connection deployed in order to test the Connection. See Adding a JDBC Driver to your QuerySurge Agent for instructions about deploying the Unity MongoDB JDBC driver.
10. Save the Connection.
11. Congratulations! You’ve created a QuerySurge Connection. Make sure that you have deployed the driver for this Connection to all your QuerySurge Agents. (See Adding a JDBC Driver to your QuerySurge Agent for instructions.)