mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-29 16:14:42 +00:00
23 lines
558 B
Markdown
23 lines
558 B
Markdown
|
|
### Prepare mongo for monitoring
|
||
|
|
|
||
|
|
- Have a running mongodb instance
|
||
|
|
- Have the monitoring user created
|
||
|
|
- Have the monitoring user granted the necessary permissions
|
||
|
|
|
||
|
|
Mongodb recommends to set up a least privilege user (LPU) with a `clusterMonitor` role in order to collect.
|
||
|
|
|
||
|
|
Run the following command to create a user with the necessary permissions.
|
||
|
|
|
||
|
|
```
|
||
|
|
use admin
|
||
|
|
db.createUser(
|
||
|
|
{
|
||
|
|
user: "monitoring",
|
||
|
|
pwd: "<PASSWORD>",
|
||
|
|
roles: ["clusterMonitor"]
|
||
|
|
}
|
||
|
|
);
|
||
|
|
```
|
||
|
|
|
||
|
|
Replace `<PASSWORD>` with a strong password and set is as env var `MONGODB_PASSWORD`.
|