MongoDB — Prerequisites

Prerequisites for monitoring MongoDB with HEAL.

1 min read Updated SS

Prerequisites to complete before adding this component in the HEAL Control Center.

Configure the MongoDB instance by following the below steps:

  1. 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>"] }]
    });
    
  2. Assign user privileges within the specific database:

    db.grantRolesToUser("<USERNAME>", [
        { role: "read", db: "<DATABASE_NAME>" }
    ]);
    
  3. Modify the MongoDB configuration File (mongo.conf) to include specific IP:

    bindIp: <IP>
    
  4. 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