MongoDB — Prerequisites
Prerequisites for monitoring MongoDB with HEAL.
Prerequisites to complete before adding this component in the HEAL Control Center.
Configure the MongoDB instance by following the below steps:
-
Create a User for a specific database and IP Address:
db.createUser({ user: "<USERNAME>", pwd: "<PASSWORD>", roles: [{ role: "read", db: "<DATABASE_NAME>" }], authenticationRestrictions: [{ clientSource: ["<IP>"] }] }); -
Assign user privileges within the specific database:
db.grantRolesToUser("<USERNAME>", [ { role: "read", db: "<DATABASE_NAME>" } ]); -
Modify the MongoDB configuration File (
mongo.conf) to include specific IP:bindIp: <IP> -
Set Up Connection Details for the MongoDB Service in the Control Center:
Username: <USERNAME> Password: <PASSWORD> IP Address: <IP> Port: 27017
Note: Ensure the above settings are implemented when initializing the MongoDB service instance version 6.0.9 through the Control Center.
See also: MongoDB (what HEAL monitors) · Setup & configuration guide