Skip to content

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

License

Notifications You must be signed in to change notification settings

Bogdanp/fargate_scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Packages

 
 
 

Languages