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
* Update mongodb.md
Make it more clear about the new convention for --cluster argument
* Update mongodb.md
* Update mongodb.md
* Update mongodb.md
* Update documentation/docs/install-pmm/install-pmm-client/connect-database/mongodb.md
Co-authored-by: Catalina A <94133018+catalinaadam@users.noreply.github.com>
---------
Co-authored-by: Catalina A <94133018+catalinaadam@users.noreply.github.com>
Copy file name to clipboardExpand all lines: documentation/docs/install-pmm/install-pmm-client/connect-database/mongodb.md
+45-45Lines changed: 45 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,53 +24,53 @@ Role privileges depend on:
24
24
25
25
### Create monitoring role
26
26
27
-
After connecting to your MongoDB instance, create custom role with the privileges required for metric collection, working with Query Analytics (QAN) and optionally creating/restoring backups:
27
+
After connecting to your MongoDB instance, create a custom role with the privileges required for metric collection, working with Query Analytics (QAN) and optionally creating/restoring backups:
28
28
29
-
!!! caution alert alert-warning "Important"
30
-
Values for username (`user`) and password (`pwd`) are examples. Replace them before using these code snippets.
29
+
#### Minimum privileges
30
+
31
+
This role grants the essential minimum privileges needed for monitoring and QAN:
If you plan to use PMM's backup features, create a role with full backup management privileges:
57
-
58
-
```javascript
59
-
db.getSiblingDB("admin").createRole({
60
-
"role": "pbmAnyAction",
61
-
"privileges": [
62
-
{
63
-
"resource": { "anyResource": true },
64
-
"actions": [ "anyAction" ]
65
-
}
66
-
],
67
-
"roles": []
68
-
});
69
-
```
67
+
"roles": []
68
+
});
69
+
```
70
70
71
71
### Create user and assign created role
72
72
73
-
After creating the role, create the PMM user and assign role based on your MongoDB version and requirements:
73
+
After creating the custom roles, create the PMM user and assign the roles based on your MongoDB version and requirements:
74
74
75
75
=== "MongoDB 8.0+ (Standard)"
76
76
MongoDB 8.0 introduced stricter security for direct shard access. For MongoDB 8.0 and later, the PMM user also requires the `directShardOperations` role to collect complete metrics from all cluster components:
@@ -349,7 +349,7 @@ After configuring your database server, add a MongoDB service using either the u
349
349
--password=your_secure_password \
350
350
--host=127.0.0.1 \
351
351
--port=27017 \
352
-
--cluster=my_cluster_name \
352
+
--cluster=my_cluster_or_rs_name \
353
353
--enable-all-collectors
354
354
```
355
355
@@ -360,7 +360,7 @@ After configuring your database server, add a MongoDB service using either the u
360
360
--password=your_secure_password \
361
361
--host=127.0.0.1 \
362
362
--port=27017 \
363
-
--cluster=my_cluster_name \
363
+
--cluster=my_cluster_or_rs_name \
364
364
--enable-all-collectors \
365
365
--tls-skip-verify
366
366
```
@@ -372,7 +372,7 @@ After configuring your database server, add a MongoDB service using either the u
372
372
--password=your_secure_password \
373
373
--host=127.0.0.1 \
374
374
--port=27017 \
375
-
--cluster=my_cluster_name \
375
+
--cluster=my_cluster_or_rs_name \
376
376
--enable-all-collectors \
377
377
--query-source=mongolog
378
378
```
@@ -390,14 +390,14 @@ After configuring your database server, add a MongoDB service using either the u
390
390
--tls-ca-file=/path/to/ca.pem \
391
391
--authentication-mechanism=MONGODB-X509 \
392
392
--authentication-database=$external \
393
-
--cluster=my_cluster_name \
393
+
--cluster=my_cluster_or_rs_name \
394
394
--enable-all-collectors
395
395
```
396
396
397
397
When successful, PMM Client will print `MongoDB Service added` with the service's ID and name. Use the `--environment` and `--custom-labels` options to set tags for the service to help identify them.
398
398
399
399
!!! hint alert alert-success "Tips"
400
-
- When adding nodes to a sharded cluster, ensure to add each node using the same `--cluster mycluster` option. This allows the [MongoDB Cluster Summary](../../../reference/dashboards/dashboard-mongodb-cluster-summary.md) dashboard to populate correctly.
400
+
- When adding members of a replica set or sharded cluster, ensure to add each node using the same `--cluster my_cluster_or_rs_name`. This allows the [MongoDB Cluster Summary](../../../reference/dashboards/dashboard-mongodb-cluster-summary.md) and [MongoDB ReplSetSummary](../../../reference/dashboards/dashboard-mongodb-replset-summary.md) dashboards to populate correctly.
401
401
- PMM does not gather collection and index metrics if it detects you have more than 200 collections, in order to limit the resource consumption. Check the [advanced options](../../../use/commands/pmm-admin.md#advanced-options) section if you want to modify this behaviour.
402
402
- When running mongos routers in containers, specify the `diagnosticDataCollectionDirectoryPath` to ensure that pmm-agent can properly capture mongos metrics. For example: `mongos --setParameter diagnosticDataCollectionDirectoryPath=/var/log/mongo/mongos.diagnostic.data/`
0 commit comments