Skip to Content
Unified docs shell with shared Classifyre tokens and acid-green highlight accents.
SourcesMongo DB

Mongo DB

Schema-driven source documentation.

MONGODB48 fields3 examples
Commonly Asked Questions
Assistant knowledge mapped to this source type from assistant_knowledge.json.

Required
Fields required for a valid configuration payload under `config.required`.
PathTypeRequiredDescriptionDefaultConstraints
requiredobjectYes
Masked
Sensitive fields under `config.masked` (secrets/credentials).
PathTypeRequiredDescriptionDefaultConstraints
maskedobjectYes
Optional
Optional configuration fields under `config.optional`.
PathTypeRequiredDescriptionDefaultConstraints
optionalobjectNono extra properties
optional.connectionobjectNoMongoDB connection and authentication tuning options.no extra properties
optional.connection.app_namestringNoMongoDB appName (Atlas and driver telemetry label)
optional.connection.auth_mechanismenumNoMongoDB authentication mechanism Allowed values: DEFAULT, SCRAM-SHA-1, SCRAM-SHA-256, MONGODB-AWS, MONGODB-X509, GSSAPI, PLAIN
optional.connection.auth_sourcestringNoAuthentication database/source (for example, admin)
optional.connection.connect_timeout_msintegerNoMongoDB connection timeout in milliseconds10000min 100, max 120000
optional.connection.direct_connectionbooleanNoConnect directly to a single host instead of topology discovery
optional.connection.optionsobjectNoAdditional pymongo.MongoClient keyword arguments (advanced usage).{}
optional.connection.replica_setstringNoReplica set name for on-prem deployments
optional.connection.tlsbooleanNoEnable TLS for on-prem connections when required
optional.scopeobjectNoMongoDB database and collection selection scope.no extra properties
optional.scope.collection_limitintegerNoOptional cap on number of collections extracted per databasemin 1
optional.scope.databasestringNoSingle database to scan (optional when include_all_databases is true)
optional.scope.exclude_collectionsarrayNoOptional collection denylist. Accepted forms: collection or database.collection
optional.scope.exclude_collections[]stringNo
optional.scope.exclude_databasesarrayNoDatabase denylist (exact database names)["admin","config","local"]
optional.scope.exclude_databases[]stringNo
optional.scope.include_all_databasesbooleanNoScan all visible databases except excluded system databasestrue
optional.scope.include_collectionsarrayNoOptional collection allowlist. Accepted forms: collection or database.collection
optional.scope.include_collections[]stringNo
optional.scope.include_system_collectionsbooleanNoInclude system.* collections when truefalse
Examples
Reference payloads generated from shared source examples JSON.
Atlas cluster discovery scan
Discover all collections in a MongoDB Atlas cluster with random document sampling

Schedule

{
  "enabled": true,
  "preset": "weekday_morning",
  "cron": "34 6 * * 1-5",
  "timezone": "UTC"
}

Config Payload

{
  "type": "MONGODB",
  "required": {
    "deployment": "ATLAS",
    "cluster_host": "your-cluster.mongodb.net"
  },
  "masked": {
    "username": "your-username",
    "password": "your-password"
  },
  "optional": {
    "scope": {
      "include_all_databases": true
    }
  },
  "sampling": {
    "strategy": "RANDOM",
    "rows_per_page": 50
  }
}
On-prem MongoDB with latest-document sampling
Scan an on-prem MongoDB deployment prioritizing newest documents per collection

Schedule

{
  "enabled": true,
  "preset": "nightly",
  "cron": "24 2 * * *",
  "timezone": "UTC"
}

Config Payload

{
  "type": "MONGODB",
  "required": {
    "deployment": "ON_PREM",
    "host": "your-host",
    "port": 27017
  },
  "masked": {
    "username": "your-username",
    "password": "your-password"
  },
  "optional": {
    "connection": {
      "auth_mechanism": "SCRAM-SHA-256",
      "auth_source": "admin"
    },
    "scope": {
      "include_all_databases": true
    }
  },
  "sampling": {
    "strategy": "LATEST",
    "rows_per_page": 50
  }
}
Atlas secrets detection scan
Scan all collections in Atlas for hardcoded secrets — catches API keys and tokens stored in documents

Schedule

{
  "enabled": true,
  "preset": "nightly",
  "cron": "0 3 * * *",
  "timezone": "UTC"
}

Config Payload

{
  "type": "MONGODB",
  "required": {
    "deployment": "ATLAS",
    "cluster_host": "your-cluster.mongodb.net"
  },
  "masked": {
    "username": "your-username",
    "password": "your-password"
  },
  "optional": {
    "scope": {
      "include_all_databases": true
    }
  },
  "sampling": {
    "strategy": "RANDOM",
    "rows_per_page": 30
  },
  "detectors": [
    {
      "type": "SECRETS",
      "enabled": true
    }
  ]
}