Mongo properties

All MongoDB properties are defined within the mongo object in theItential Platform service instance configuration for the adapter. The adapter uses MongoDB to store three things: metrics, the throttle queue, and optionally the adapter configuration.

MongoDB is not required for the adapter to function. If you do not configure it, you can disable metrics or store them on the file system, and throttling can operate in memory.

Do not store adapter database information in theItential Platform database. Doing so can cause issues when upgradingItential Platform.

Properties

PropertyTypeRequiredDescription
hoststringNoHostname of the MongoDB server.
portintegerNoPort on the MongoDB server.
databasestringNoName of the adapter database within the MongoDB instance.
usernamestringNoUsername for authenticating with the database.
passwordstringNoPassword for authenticating with the database.
replSetstringNoReplica set name, if a replica set is in use.
db_sslobjectNoSSL configuration for the database connection. Fields: enabled (boolean), accept_invalid_certs (boolean), ca_file (string, fully qualified path), key_file (string, fully qualified path), cert_file (string, fully qualified path).

Example

This example connects to a MongoDB instance at mymongo.com:27017 using username and password authentication, without a replica set or SSL.

1"mongo": {
2 "host": "mymongo.com",
3 "port": 27017,
4 "database": "adapter-xyz",
5 "username": "username",
6 "password": "password",
7 "replSet": "",
8 "db_ssl": {
9 "enabled": false,
10 "accept_invalid_cert": true,
11 "ca_file": "",
12 "key_file": "",
13 "cert_file": ""
14 }
15}