Scraping Metrics in Standalone Hosts

Automatically scrape metrics from processes running on standalone hosts

Host based sensors can be configured to scrape Prometheus endpoints using standard Prometheus discovery jobs.

The scrape configuration should be placed in the following file:

/opt/groundcover/scrape-config/metrics-scrape-config.yaml

Example - 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

Example - 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 .

scrape_configs:
  - job_name: scrape-remote-service
    honor_timestamps: true
    honor_labels: true
    scrape_interval: 15s
    scrape_timeout: 5s
    metrics_path: /metrics
    scheme: http
    static_configs:
    - targets:
      - my-custom-domain.com:443
      - 1.2.3.4:443

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-explorer

Last updated