Mongo Properties
- 16 Jan 2025
-
DarkLight
-
PDF
Mongo Properties
- Updated on 16 Jan 2025
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Definition
All mongo properties are contained within the mongo object in the IP Service Instance Configuration for the adapter. The Mongo properties are used to define a database where the adapter can store information. At the current time, three things are stored in the database – metrics, throttling queue, and (if desired) the adapter configuration.
Property | Type | Required | Description |
---|---|---|---|
host |
string | No | The server where the adapter mongo database can be found. |
port |
integer | No | The port on the server where the adapter mongo database can be found. |
database |
string | No | The adapter database within the mongo instance. |
username |
string | No | The username used to log into the database. |
password |
string | No | The password used at login to the database. |
replSet |
string | No | If a replica set is being used, it should be defined here. |
db_ssl |
object | No | Defines SSL encryption with the database.enabled : Determines whether the mongo server system has SSL/TLS enabled for requests. The fields within the objext are similar to the standard adapter SSL/TLS properties.accept_invalid_certs :Determines if the adapter should accept invalid (i.e., ignore) certificates.ca_file :The fully qualified path name to the CA file used for SSL.key_file :The fully qualified path name to the key file used for SSL.cert_file :The fully qualified path name to the certificate file used for SSL. |
Example Scenario
- Keep in mind the adapter does not need Mongo to work. You can either turn metrics off, or the adapter can store metrics on the file system and throttling can be done in memory.
- The adapter does not want to store database information in the IP database because it can cause issues when upgrading IP.
- The example properties show an adapter database on server mymongo.com accessible on port 27017. The adapter database is called adapter-xyz and we are connecting to the database via username and password.
- In this example:
- A replica set is not used.
- SSL is not used to connect.
IP Service Instance Configuration Properties for the Adapter
SAMPLE PROPERTIES
"mongo": {
"host": "mymongo.com",
"port": 27017,
"database": "adapter-xyz",
"username": "username",
"password": "password",
"replSet": "",
"db_ssl": {
"enabled": false,
"accept_invalid_cert": true,
"ca_file": "",
"key_file": "",
"cert_file": ""
}
},
Was this article helpful?