Skip to content

Commit 70fcd96

Browse files
Merge pull request #1924 from oracle-devrel/witold-swierzy-patch-8
Create Complete list of parameters.md
2 parents 19754f2 + 2598c9b commit 70fcd96

File tree

1 file changed

+140
-0
lines changed

1 file changed

+140
-0
lines changed
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
### MDBExtractor
2+
3+
**Prerequisites**
4+
5+
- The source MongoDB instance needs to be up and running.
6+
7+
- To extract data from traditional MongoDB log file, enable logging --
8+
the so-called slow operations at the MongoDB instance level - by
9+
executing the following command *db.setProfilingLevel(0, -1)*
10+
11+
- To extract data from db.system.profile collection or its dump file,
12+
enable traditional profiling, by executing the following command
13+
*db.setProfilingLevel(2*)
14+
15+
- The configuration file \$MR_CONFIG_DIR/MDBExtractConfig.json with the
16+
required parameter settings is created.
17+
18+
**Configuration File:**
19+
20+
{
21+
22+
\"OUTPUT_DIR\" : \"\<name and location of the output file\>\",
23+
24+
\"INPUT_FILE\" : \"\<name and location of the input file\>\"
25+
\"COMMANDS_LOGGING\" : \"\<true\|false\>\",
26+
27+
\"INCLUDE_DATABASES\" : \<list of databases\>,
28+
29+
\"INCLUDE_COMMANDS\" : \<commands\>,
30+
31+
\"EXCLUDE_COMMANDS\" : \<commands\>,
32+
33+
\"EXECUTION_PLAN_TRACING\" : \<level of details\>,
34+
35+
\"OUTPUT_MODE\" : \"\<output format\>\"
36+
37+
}
38+
39+
- **OUTPUT_DIR** (default: standard output) defines the directory of the
40+
output files.
41+
42+
<!-- -->
43+
44+
- **INPUT_FILE** (default: standard input) defines the input log file
45+
generated by a MongoDB Instance with profiling enabled.
46+
47+
- **COMMANDS_LOGGING** (default:  \"true\") defines the commands that
48+
will be reported.  If \"false\", only commands will be reported.\
49+
If set to \"true\", every command found by the extractor will be
50+
additional logged in console.log used for mongosh script generation.
51+
52+
- **INCLUDE_DATABASES** provides a list of databases in a JSON array,
53+
which will be traced. This parameter cannot be used simultaneously
54+
with EXCLUDE_DATABASES
55+
56+
- **EXCLUDE_DATABASES** provides a list of databases in a JSON array,
57+
which will NOT be traced. This parameter cannot be used simulateously
58+
with INCLUDE_DATABASES
59+
60+
<!-- -->
61+
62+
- **INCLUDE_COMMANDS** provides a JSON array with the list of commands,
63+
which will be extracted.
64+
65+
- **EXCLUDE_COMMANDS** provides a JSON array with the list of commands,
66+
which will be ignored.
67+
68+
- **EXECUTION_PLAN_TRACING** provides explain() commands, if set to a
69+
non-zero value. Otherwise only runCommand will be provided in the
70+
output.
71+
72+
- **OUTPUT_MODE** defines the output format. If set to JSON, the output
73+
will be formatted in sequence of JSON documents. If set to SCRIPT, the
74+
output is formatted in NodeJS script, which can be consumed by
75+
mongosh.
76+
77+
**MDBApplier**
78+
79+
**Prerequisites**
80+
81+
- The target Oracle Database with [[Oracle API for
82+
MongoDB]{.underline}](https://docs.oracle.com/en/database/oracle/mongodb-api/mgapi/overview-oracle-database-api-mongodb.html#GUID-1CF44843-6294-45F0-8065-B9E8034D6CB1) is
83+
enabled.
84+
85+
- A subset of the data is defined representing all collections which
86+
will be traced.
87+
88+
- The configuration file \$MR_CONFIG_DIR/MDBApplierConfig.json with the
89+
required parameter settings is created.
90+
91+
**Parameters for MDBApplier**
92+
93+
**Configuration File**
94+
95+
{
96+
97+
\"INPUT_FILE\" : \"\<name and location of the input file\>\",
98+
99+
\"DB_NAME\" : \"\<name of the database\>\",
100+
101+
\"LOG_FILE\" : \"\<log file location and name\>\",
102+
103+
\"LOG_LEVEL\" : \"\<level of details\>\",
104+
105+
\"INTERACTIVITY_LEVEL\" : \"\<level of interactivity\>\"
106+
107+
**\"CONNECT_STRING\"** : \"\<connect_string\>\"
108+
109+
}
110+
111+
- **INPUT_FILE** (default: standard input) defines the input log file
112+
generated by a MDBExtractor.
113+
114+
- **DB_NAME** defines the target database name.
115+
116+
- **CONNECT_STRING** (mandatory) defines the connect string for a target
117+
MongoDB or Oracle API for MongoDB Instance.
118+
119+
- **LOG_FILE** (default: standard diagnostic output) is the name of log
120+
file used.
121+
122+
- **LOG_LEVEL** (default: 0) defines the level of logging details. 0
123+
provides only a summary of initialization and processing information;
124+
1 additionally errors will be logged, 2 in addition all the commands
125+
will be logged.
126+
127+
- **INTERACTIVITY_LEVEL** (default: silent) defines the level of
128+
interactivity. Its default value means, that Applier will work in
129+
silent mode, and will not ask for anything. It is usefull, when the
130+
tool is working as a background process. "BASIC" means, that Applier
131+
will ask for confirmation after displaying the summary of settings and
132+
before applying of any command. "FULL" means that Applier will ask
133+
also for confirmation before applying any command to a target system.
134+
It is useful, when we want to test only few commands.
135+
136+
Note:
137+
138+
- Parameters in **bold** are mandatory!
139+
140+
- The sequence of the parameters is not important.

0 commit comments

Comments
 (0)