Scraping Metrics with Sensor

The groundcover sensors spread across your environment can be used to scrape metrics, to refrain from having a large load on a single scraper and to minimize cross-AZ traffic.

Enabling Metrics-Scraping on Sensor

To enable scraping using the sensor, use the following values:

agent:
  sensor:
    metricIngestor:
      scraperEnabled: true

Notice that if custom-metrics pod-specific metrics scraping was previously in use, it should be disabled in order to refrain from having the same metrics scraped twice. To do that, remove the scrape jobs that sensor performs from the dedicated custom-metrics pod configuration.

Scraping custom metrics may increase sensor's resource consumption, depending on the configuration, the cardinality of the scraped metrics, and the number of scraped pods.

Since metrics are usually spread out across all nodes, this is usually negligible when compared to a global custom-metrics scraper.

Configuring Scrape Jobs

Sensor's scrape jobs are configured in its sensor-scrape-configuration configmap, under metrics-scrape-config.yaml. If you're running sensor on a node, it can be found at /opt/groundcover/scrape-config/metrics-scrape-config.yaml.

This configuration file is fully compatible with prometheus scrape job syntax - more can be found here.

Sensor automatically adds a node selector to the discovery process, resulting in every sensor scraping metrics only from pods on the same node. This is only true for metrics under the pod role.

The default configuration contains discovery and scraping of pod-specific metrics:

Last updated