Status | |
---|---|
Stability | beta |
Supported pipeline types | metrics, logs |
Distributions | contrib |
Receives metrics from MongoDB Atlas via their monitoring APIs, as well as alerts via a configured webhook.
The MongoDB Atlas receiver takes the following parameters. public_key
and
private_key
are the only two required values to receive metrics and logs and are obtained via the
"API Keys" tab of the MongoDB Atlas Project Access Manager. In the example
below both values are being pulled from the environment.
In order to collect logs, at least one project must be specified. By default, logs for all clusters within a project will be collected. Clusters can be limited using either the include_clusters
or exclude_clusters
setting.
MongoDB Atlas Documentation recommends a polling interval of 5 minutes.
public_key
(required for metrics, logs, or alerts inpoll
mode)private_key
(required for metrics, logs, or alerts inpoll
mode)granularity
(defaultPT1M
- See MongoDB Atlas Documentation)storage
configure the component ID of a storage extension. If specified, alertspoll
mode will utilize the extension to ensure alerts are not duplicated after a collector restart.retry_on_failure
enabled
(default true)initial_interval
(default 5s)max_interval
(default 30s)max_elapsed_time
(default 5m)
alerts
enabled
(default false)mode
(defaultlisten
. Options arepoll
orlisten
)secret
(required if usinglisten
mode)endpoint
(required if usinglisten
mode)poll_interval
(default5m
, only relevant usingpoll
mode)page_size
(default100
)- When in
poll
mode, this is the number of alerts that will be processed per request to the MongoDB Atlas API.
- When in
max_pages
(default10
)- When in
poll
mode, this will limit how many pages of alerts the receiver will request for each project.
- When in
projects
(required if usingpoll
mode)name
(required if usingpoll mode
)include_clusters
(default empty, exclusive withexclude_clusters
)exclude_clusters
(default empty, exclusive withinclude_clusters
)- If both
include_clusters
andexclude_clusters
are empty, then all clusters in the project will be included
- If both
tls
(relevant only forlisten
mode)key_file
cert_file
logs
enabled
(default false)projects
(required if enabled)name
(required if enabled)collect_audit_logs
(default false)include_clusters
(default empty)exclude_clusters
(default empty)
Examples:
Receive metrics:
receivers:
mongodbatlas:
public_key: ${env:MONGODB_ATLAS_PUBLIC_KEY}
private_key: ${env:MONGODB_ATLAS_PRIVATE_KEY}
Listen for alerts (default mode):
receivers:
mongodbatlas:
alerts:
enabled: true
secret: "some_secret"
endpoint: "0.0.0.0:7706"
Poll alerts from API:
receivers:
mongodbatlas:
public_key: <redacted>
private_key: <redacted>
alerts:
enabled: true
mode: poll
projects:
- name: Project 0
include_clusters: [Cluster0]
poll_interval: 1m
# use of a storage extension is recommended to reduce chance of duplicated alerts
storage: file_storage
Receive logs:
receivers:
mongodbatlas:
logs:
enabled: true
projects:
- name: "project 1"
collect_audit_logs: true