Skip to content

Commit b46e239

Browse files
authored
DOCSP-48386 Add monitoring page (#1046)
1 parent d3d04b2 commit b46e239

11 files changed

+747
-758
lines changed

source/code-snippets/monitoring/apm-subscribe.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ const client = new MongoClient(uri, { monitorCommands:true });
1010
// Replace <event name> with the name of the event you are subscribing to
1111
const eventName = "<event name>";
1212

13-
// Subscribe to a specified event and print a message when the event is received
13+
// Subscribes to a specified event and print a message when the event is received
1414
client.on(eventName, event => console.log(event));
1515

1616
async function run() {
1717
try {
18-
// Establish and verify connection to the "admin" database
18+
// Establishes and verifies connection to the "admin" database
1919
await client.db("admin").command({ ping: 1 });
2020
console.log("Connected successfully");
2121
} finally {
22-
// Close the database connection on completion or error
22+
// Closes the database connection on completion or error
2323
await client.close();
2424
}
2525
}

source/code-snippets/monitoring/cpm-subscribe.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ const client = new MongoClient(uri);
99
// Replace <event name> with the name of the event you are subscribing to
1010
const eventName = "<event name>";
1111

12-
// Subscribe to the event
12+
// Subscribes to the event
1313
client.on(eventName, (event) =>
1414
console.log("\nreceived event:\n", event)
1515
);
1616

1717
async function run() {
1818
try {
19-
// Establish and verify connection
19+
// Establishes and verifies connection
2020
await client.db("admin").command({ ping: 1 });
2121
console.log("\nConnected successfully!\n");
2222
} finally {

source/code-snippets/monitoring/sdam-subscribe.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ const client = new MongoClient(uri);
1010
// Replace <event name> with the name of the event you are subscribing to
1111
const eventName = "<event name>";
1212

13-
// Subscribe to a specified event and print a message when the event is received
13+
// Subscribes to a specified event and prints a message when the event is received
1414
client.on(eventName, event => {
1515
console.log(`received ${eventName}: ${JSON.stringify(event, null, 2)}`);
1616
});
1717

1818
async function run() {
1919
try {
20-
// Establish and verify connection to the database
20+
// Establishes and verifies connection to the database
2121
await client.db("admin").command({ ping: 1 });
2222
console.log("Connected successfully");
2323
} finally {
24-
// Close the database connection on completion or error
24+
// Closes the database connection on completion or error
2525
await client.close();
2626
}
2727
}

source/fundamentals.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Fundamentals
1717
Indexes </fundamentals/indexes>
1818
Collations </fundamentals/collations>
1919
Logging </fundamentals/logging>
20-
Monitoring </fundamentals/monitoring>
2120
GridFS </fundamentals/gridfs>
2221
Time Series </fundamentals/time-series>
2322
TypeScript </fundamentals/typescript>

0 commit comments

Comments
 (0)