marmotdata/mongodb
Discover databases and collections from MongoDB instances
The MongoDB plugin discovers databases and collections from MongoDB instances. It samples documents to infer schema and captures index information.
Required Permissions
The user needs read access to discover collections:
db.createUser({
user: "marmot_reader",
pwd: "your-password",
roles: [{ role: "read", db: "your_database" }]
})
For discovering all databases, use the readAnyDatabase role.
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick MongoDB from the plugin list.
- Fill in the settings, set a schedule and save.
With the CLI
Save a YAML config, then run marmot ingest.
Not using plugins? Other ways to populate Marmot
Configuration
Fields marked Required must be set.
tagsList of textTags to apply to discovered assets
external_linksList of groupsExternal links to show on all assets
nameTextDisplay name for the link
iconTextIcon identifier for the link
urlTextURL to the external resource
filterGroup of settingsFilter discovered assets by name (regex)
includeList of textInclude patterns for resource names (regex)
excludeList of textExclude patterns for resource names (regex)
zoneTextTells this system apart from others of the same technology and becomes part of every asset's MRN
connection_uriTextMongoDB connection URI (overrides host/port/user/password)
hostText RequiredMongoDB server hostname or IP address
portNumberMongoDB server port
userTextUsername for authentication
passwordSecretPassword for authentication
auth_sourceTextAuthentication database name
tlsYes or noEnable TLS/SSL for connection
tls_insecureYes or noSkip verification of server certificate
include_databasesYes or noWhether to discover databases
include_collectionsYes or noWhether to discover collections
include_viewsYes or noWhether to include views
include_indexesYes or noWhether to include index information
sample_schemaYes or noSample documents to infer schema
sample_sizeNumberNumber of documents to sample (-1 for entire collection)
use_random_samplingYes or noUse random sampling for schema inference
exclude_system_dbsYes or noWhether to exclude system databases (admin, config, local)
Assets emitted
Metadata this plugin attaches to each discovered asset.
MongoDB
MongoDB-specific metadata fields
Index
MongoDB index metadata
Schema
MongoDB schema metadata from schema sampling