You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: data-platform/autonomous-database/autonomous-json/MongoDBReplay/README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,14 +25,21 @@ See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/
25
25
## Usage
26
26
1. Generic requirements
27
27
- MR_CONFIG_DIR variable has to be set to a directory, where configuration and log files are/will be stored
28
+
- JDK 21 (it can be Oracle or OpenJDK)
29
+
- Oracle JDK can be downloaded from the following link: https://www.oracle.com/java/technologies/downloads/#java21
30
+
- OpenJDK is usually available in a Linux packates repository, but also can be downloaded and installed independly from the following link: https://openjdk.org/
28
31
29
32
1.MDBExtractor
30
33
requirements:
31
34
- Source MongoDB instance up and running
32
35
- Profiling at the MongoDB instance
33
36
- to extract data from traditional Mongod log file, there is need to enable logging so called slow operations at the Mongod instance level. It can be done by executing the following command:
34
37
35
-
db.setProfilingLevel(0, -1)
38
+
db.setProfilingLevel(0, -1)
39
+
- to extract data from db.system.profile collection or its dump there is need to enable traditional profiling, by executing the following command:
40
+
41
+
db.setProfilingLevel(2)
42
+
36
43
- The following configuration file $MR_CONFIG_DIR/MDBExtractConfig.json needs to be existing with the following parameters
37
44
38
45
OUTPUT_DIR : optional; points to directory where output files will be created;
@@ -41,6 +48,12 @@ See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/
41
48
INPUT_FILE : optional; points to an input log file generated by a MongoDB Instance with profiling enabled
42
49
if this parameter is not set, then MDBExtractor will read data from standard input
43
50
51
+
INPUT_FILE_FORMAT : optional; provides information about from which file the data will be read. It accepts two values
52
+
MONGO_LOG : in that case Extractor will be reading data from traditional Mongod log file. Profiling needs to be set to (0,-1)
53
+
MONGO_PROFILE : in that case Extractor will be reading data from dump of db.system.profile collection. Profiling needs to be set to (2)
54
+
55
+
INPUT_CONNECT_STRING : optional; if set then it points to a MongoDB instance, from which input data will be read directly. Profiling needs to be set to (2). When this parameter is set, then INPUT_FILE and INPUT_FILE_FORMAT cannot be set.
56
+
44
57
COMMANDS_LOGGING : optional; default value "true", if set to "true" then every command found by the extractor will be
45
58
additional logged with console.log(...). Useful, when output will be processed by mongosh tool, which
46
59
has limited capabilities related to error reporting. When set to "false" only commands will be reported.
0 commit comments