Scraping Metrics in Standalone Hosts

Automatically scrape metrics from processes running on standalone hosts

circle-exclamation

Host based sensors can be configured to scrape Prometheus endpoints using standard Prometheus discovery jobsarrow-up-right.

To enable metrics scraping add the following overrides to your /etc/opt/groundcover/overrides.yaml file:

receivers:
 remotewrite:
  enabled: true
 metricsscraper:
  enabled: true

Scrape configurations should be placed in the following file: /opt/groundcover/scrape-config/metrics-scrape-config.yaml

Below are the examples you can refer to.

Scraping Local Service

In this example we are instructing the sensor to periodically scrape metrics from a local service exposing its metrics on port 8080 under /metrics.

scrape_configs:
  - job_name: scrape-local-service
    honor_timestamps: true
    honor_labels: true
    scrape_interval: 15s
    scrape_timeout: 5s
    metrics_path: /metrics
    scheme: http
    static_configs:
    - targets:
      - localhost:8080

Scraping Remote Service

In this example we are instructing the sensor to periodically scrape metrics from a remote service exposing its metrics on port 443 under /metrics and adding a team label.

circle-check

Common Questions

How often are my metrics scraped?

Metrics are scraped periodically based on the scrape_interval configured.

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-explorerarrow-up-right

Last updated