Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Fargate Scraper

A CLI tool that scrapes Fargate tasks to find Prometheus targets.

Installation

pip install fargate-scraper

Usage

Give the script the name of the ECS cluster you want to scrape and the location of where it should output the results. It will automatically pick up credentials from its environment. See boto3 for details.

fargate-scraper --cluster-name my-cluster output.json

Then point your prometheus config at that file.

scrape_configs:
  - job_name: prometheus
    metrics_path: "/metrics"
    file_sd_configs:
      - files:
          - output.json
        refresh_interval: 10m

Prometheus will automatically pick up changes to the file.

The script will pick up any Fargate containers that have a METRICS_PORT env var defined.

License

fargate_scraper is licensed under Apache 2.0. Please see LICENSE for licensing details.

About

A CLI tool that scrapes AWS Fargate tasks to find Prometheus targets.

Topics

Resources

License

Packages

No packages published

Languages