MongoDB Metrics
Requirements
User from endpoint should have enough privileges for running serverStatus command.
Configuration Options
Required Options
endpoints(required)
MongoDB Connection String URI Format
Type | Syntax | Default | Example |
---|---|---|---|
array | literal | ["mongodb://localhost:27017"] |
type(required)
The component type. This is a required field for all components and tells Vector which component to use.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["mongodb_metrics"] |
Advanced Options
scrape_interval_secs(optional)
The interval between scrapes.
Type | Syntax | Default | Example |
---|---|---|---|
uint | 15 |
namespace(optional)
The namespace of metrics. Disabled if empty.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | mongodb |
How it Works
MongoDB `serverStatus` command
The serverStatus command
returns a document that provides an overview of the database’s
state. The output fields vary depending on the version of
MongoDB, underlying operating system platform, the storage
engine, and the kind of node, including mongos
, mongod
or
replica set
member.
State
This component is stateless, meaning its behavior is consistent across each input.
Context
By default, the mongodb_metrics
source augments events with helpful
context keys.