marmotdata/couchbase
Discover buckets, scopes and collections from Couchbase clusters
The Couchbase plugin discovers buckets, scopes and collections from Couchbase Server and Capella clusters. It infers a document schema by sampling each collection, records query indexes and collects document counts and bucket sizes.
Required Permissions
Discovery needs a user that can list buckets, scopes and collections, run read-only N1QL queries (SELECT, INFER, system:indexes) and read bucket statistics from the management API on port 8091 (18091 for couchbases://).
On Community Edition, bucket_full_access on the buckets to catalog is enough:
couchbase-cli user-manage -c localhost -u Administrator -p password --set \
--rbac-username marmot_reader --rbac-password your-password \
--roles 'bucket_full_access[*]' --auth-domain local
On Enterprise Edition and Capella, grant query_select on those buckets, query_system_catalog for the index listing, and a role that can read bucket settings and statistics, such as ro_admin.
Indexes and Sampling
Sampling reads documents through the query service, which needs a primary index or, on Couchbase Server 7.6 and later, a sequential scan. Collections without one fall back to INFER, which samples through the data service and needs no index. Document counts (SELECT COUNT(*)) are skipped when no index can answer them; on a bucket with a single collection the bucket's item count stands in. Data previews always need a primary index on the collection.
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick Couchbase 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_stringText RequiredCluster connection string: couchbase://host, or couchbases://host for TLS (Capella)
usernameText RequiredUsername for authentication
passwordSecret RequiredPassword for authentication
bucketTextOnly discover this bucket (all buckets when empty)
exclude_bucketsList of textBucket names to skip
include_system_scopesYes or noWhether to include the _system scope
include_columnsYes or noWhether to infer a document schema by sampling each collection
sample_sizeNumberNumber of documents to sample per collection for schema inference
include_indexesYes or noWhether to include query index information
include_statisticsYes or noWhether to collect document counts and bucket sizes
connect_timeout_secondsNumberSeconds to wait for the cluster connection
ssl_skip_verifyYes or noSkip TLS certificate verification for couchbases:// connections
Assets emitted
Metadata this plugin attaches to each discovered asset.
Bucket
The metadata fields the Couchbase plugin emits for bucket assets.
Collection
The metadata fields the Couchbase plugin emits for collection assets.
Column
The per-field entries embedded in a collection asset's schema, inferred from sampled documents.