MongoDB Atlas

Scrape metrics from your MongoDB Atlas

groundcover supports metrics scraping from your MongoDB Atlas.

Configuration is only enabled for Admins at this point

Enabling Metrics Exporting in MongoDB Atlas

groundcover uses the prometheus exporter of Atlas to scrape the metrics. Before setting up the scraping on groundcover side, you need to enable the metrics exporting in mongoDB. To do so, following this guide - https://www.mongodb.com/docs/atlas/tutorial/prometheus-integration/.

Adding mongoDB Integration

Navigate to Data Sources and select MongoDB Atlas.

Note that at this point, groundcover supports only the https discovery mode.

There are 2 parts to the setup process:

  1. Define the targets to be scraped

  2. Define the rules for the metrics scraping

Targets Discovery Rules

Users should provide the following parameters:

  1. Discovery endpoint + authentication details if needed

  2. Drop/Keep targets rules (optional) - this is a list of regexes indicating whether any filtering should be done on the fetched targets;

    1. Drop targets - drop all targets which match any of the regular expressions.

    2. Keep targets - drop all targets which don't match any of the regular expressions. In case both drop targets and keep targets are provided, drop targets will filter out even if there is a match in keep targets.

  3. Targets path - the path will be the same across all fetched targets

  4. Basic authentication for targets - the same authentication method and details will be applied across all fetched targets.

Metrics Scraping Rules

On top of the targets configuration, you can also provide the following parameters:

  1. Drop/Keep metrics (optional) - list of regexes of metrics to drop or keep.

    1. Drop metrics - drop all metrics that match any of the regular expressions.

    2. Keep metrics - drop all metrics that don't match any of the regular expressions.

  2. Additional relabeling (optional) - prometheus can support a vast set of relabeling rules. Use this code block to apply any additional relabeling rules. Use the relabeling cookbook to explore and configure the right releabeling rules for you.

  3. Extra labels (optional) - a list of key-value pairs to be added to all scraped metrics from this configuration, such as env=production. Use the extra labels to easily filter metrics in dashboards or monitors.

  4. Scrape interval and scrape timeout - control the cadence of scraping.

Common Questions

Where can I find scraped metrics?

All metrics in the platform can be found in the metrics exploration page: https://app.groundcover.com/explore/data-explorer

Last updated