diff --git a/data-platform/autonomous-database/autonomous-json/MongoDBReplay/README.md b/data-platform/autonomous-database/autonomous-json/MongoDBReplay/README.md index 02675d63b..3646b6031 100644 --- a/data-platform/autonomous-database/autonomous-json/MongoDBReplay/README.md +++ b/data-platform/autonomous-database/autonomous-json/MongoDBReplay/README.md @@ -25,6 +25,9 @@ See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/ ## Usage 1. Generic requirements - MR_CONFIG_DIR variable has to be set to a directory, where configuration and log files are/will be stored + - JDK 21 (it can be Oracle or OpenJDK) + - Oracle JDK can be downloaded from the following link: https://www.oracle.com/java/technologies/downloads/#java21 + - OpenJDK is usually available in a Linux packates repository, but also can be downloaded and installed independly from the following link: https://openjdk.org/ 1.MDBExtractor requirements: @@ -32,7 +35,11 @@ See [LICENSE](https://github.com/oracle-devrel/technology-engineering/blob/main/ - Profiling at the MongoDB instance - 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: - db.setProfilingLevel(0, -1) + db.setProfilingLevel(0, -1) + - to extract data from db.system.profile collection or its dump there is need to enable traditional profiling, by executing the following command: + + db.setProfilingLevel(2) + - The following configuration file $MR_CONFIG_DIR/MDBExtractConfig.json needs to be existing with the following parameters 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/ INPUT_FILE : optional; points to an input log file generated by a MongoDB Instance with profiling enabled if this parameter is not set, then MDBExtractor will read data from standard input + INPUT_FILE_FORMAT : optional; provides information about from which file the data will be read. It accepts two values + MONGO_LOG : in that case Extractor will be reading data from traditional Mongod log file. Profiling needs to be set to (0,-1) + MONGO_PROFILE : in that case Extractor will be reading data from dump of db.system.profile collection. Profiling needs to be set to (2) + + 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. + COMMANDS_LOGGING : optional; default value "true", if set to "true" then every command found by the extractor will be additional logged with console.log(...). Useful, when output will be processed by mongosh tool, which has limited capabilities related to error reporting. When set to "false" only commands will be reported.