Skip to content

Commit d78a644

Browse files
author
Anders Breid
authored
Add missing information regarding MongoDB uri. (#481)
* Add information how to write a MongoDB connection string (mongoDB uri property). * Add more details about Parameters, called options bu MongoDB
1 parent b674f28 commit d78a644

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

wiki/configuration.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configuration
22

3-
The configuration for RabbitMQ, MongoDB etc. can be set in the [application.properties](../src/main/resources/application.properties)
3+
The configuration for RabbitMQ, MongoDB etc. can be set in the [application.properties](../src/main/resources/application.properties)
44
file. You can also set them as system properties using the -D flags when starting Eiffel Intelligence.
55

66
## Setting up Multiple Eiffel Intelligence Instances
@@ -14,16 +14,16 @@ to what object is configured using a set of rules.
1414
In this case we use the same instance of RabbitMQ and MongoDB.
1515

1616
- **rabbitmq.queue.suffix** property should be different for each rule set.
17-
Otherwise the rabbitMQ will split the events in the queue among all the
17+
Otherwise the rabbitMQ will split the events in the queue among all the
1818
instances listening to that queue.
1919
- MongoDb collection names should also be different for each rule set.
2020

2121
<img src="images/multiple_EI_instances.png"></img>
2222

2323
### Set up Multiple Instances with Same Rule-set
2424

25-
This situation may be needed when the events throughput is very high. In
26-
this case the same configuration file is copied to the server where the
25+
This situation may be needed when the events throughput is very high. In
26+
this case the same configuration file is copied to the server where the
2727
extra instance will be started.
2828

2929
<img src="images/multiple_EI_instances_same_rule.png"></img>
@@ -39,7 +39,7 @@ different Eiffel protocol versions inside the war artifact file and in the
3939
source code repository. All default extraction rules json files can be
4040
found here: [extraction rules](../src/main/resources/rules)
4141

42-
Example of setting "rules.path" property in application.properties using
42+
Example of setting "rules.path" property in application.properties using
4343
default extraction rules json files provided in eiffel-intelligence war file:
4444
- rules.path: /rules/ArtifactRules-Eiffel-Agen-Version.json
4545
- rules.path: /rules/ArtifactRules-Eiffel-Toulouse-Version.json
@@ -60,7 +60,7 @@ If you wish to re-use the extracted value from IdentifyRules field
6060
somewhere else in your rule set for a particular event, it is possible
6161
to define a placeholder marker. Eiffel Intelligence will find and replace
6262
this marker in your rules with the wanted value extracted from IdentifyRules.
63-
This marker can be defined with the property **rules.replacement.marker**.
63+
This marker can be defined with the property **rules.replacement.marker**.
6464
You can see example usages of it in the [example rules](../src/main/resources/rules)
6565
and [read more about it's usage here](rules.md#using-placeholders-in-rules).
6666

@@ -161,20 +161,23 @@ used. **event.repository.url** takes a full URL to such a repository.
161161

162162
## MongoDB
163163

164-
You can set up connections to multiple MongoDB instances with or without authentication.
164+
You can set up connections to a single MongoDB instance or a Replica set of multiple MongoDB instances with or
165+
without authentication and parameters.
165166
Here are some examples:
166167

167-
mongodb://localhost:27017 - Single MongoDB instance, no authentication
168-
mongodb://username:mypasswd@localhost:27017 - Single MongoDD instance with authentication
169-
mongodb://username:mypasswd@hostname1:27017,hostname2:27017 - Multiple MongoDB instances with authentication
168+
mongodb://localhost:27017 - Single MongoDB instance, no authentication
169+
mongodb://username:mypasswd@localhost:27017 - Single MongoDD instance with authentication
170+
mongodb://username:mypasswd@hostname1:27017,hostname2:27017 - Multiple MongoDB instances with authentication
171+
mongodb://username:mypasswd@hostname1:27017,hostname2:27017/?param=value - Multiple MongoDB instances with authentication and options
170172

171173
If encryption of the MongoDB password is desired there is information [here](configuration.md#password-encryption).
174+
Options provided only once in the end but will be used for all provided hosts.
175+
The **spring.data.mongodb.uri** property specifies a MongoDB connection string, read more [here](https://docs.mongodb.com/manual/reference/connection-string/)
176+
The second property **spring.data.mongodb.database** defines a name for the database so this does not have to be provided in the uri property.
172177

173178
* spring.data.mongodb.uri
174179
* spring.data.mongodb.database
175180

176-
The second property **spring.data.mongodb.database** defines a name for the database.
177-
178181
## RabbitMQ
179182

180183
You can configure the RabbitMQ settings using the rabbitmq.* properties.
@@ -281,7 +284,7 @@ Short guide about encrypting passwords:
281284

282285
**1** Encrypt actual component password with secret encrypting password.
283286
Encrypting password should be a secret password and is created/generated by an
284-
admin user and should not be written/stored in application.properties or any
287+
admin user and should not be written/stored in application.properties or any
285288
other config files near the application in the filesystem:
286289

287290
./encrypt.sh input="<the actual component password>" password=mySecretEncryptorPassword
@@ -290,12 +293,12 @@ other config files near the application in the filesystem:
290293

291294
rv/2O+hOT4GJSPmmF/cF1w==
292295

293-
**3** Now open application.properties file and add the new encrypted password
296+
**3** Now open application.properties file and add the new encrypted password
294297
to the specific component password property with "ENC(myEncryptedPassword)" format:
295298

296299
some.component.password=ENC(rv/2O+hOT4GJSPmmF/cF1w==)
297300

298-
Do step 1 to 3 for all component passwords and properties in application.properties.
301+
Do step 1 to 3 for all component passwords and properties in application.properties.
299302
Remember to use same secret encryptor password for all components passwords.
300303

301304
**4** Now its time to run Eiffel-Intelligence with these encrypted passwords in application.properties.

0 commit comments

Comments
 (0)