Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
/ autoscaling-file-sd Public archive

This repository contains a small daemon periodically pulling members of an autoscaling-group in AWS and writing a file-sd configuration for Prometheus

License

Notifications You must be signed in to change notification settings

Jimdo/autoscaling-file-sd

Repository files navigation

License: Apache v2.0 Go Report Card

Jimdo / autoscaling-file-sd

This repository contains a small daemon periodically pulling members of an autoscaling-group in AWS and writing a file-sd configuration for Prometheus.

Usage

# autoscaling-file-sd --help
Usage of autoscaling-file-sd:
  -a, --autoscaling-group-name="": Name of the AutoScalingGroup to fetch instances from
  -i, --interval=30s: Interval to poll for changes in the ASG
      --port=0: Port to register in SRV record
  -p, --publish-to="file://discover.json": Where to write the discovery file
      --version[=false]: Print version and exit

Currently two write targets for the discovery file are supported:

  • file:// for local files (examples: file://discovery.json file:///home/myuser/discovery.json)
  • s3:// for Amazon S3 (example: s3://mybucket/path/discovery.json)

Example output file

# cat discover.json | jq
[
  {
    "targets": [
      "10.8.3.39:9102",
      "10.8.3.85:9102",
      "10.8.4.131:9102"
    ]
  }
]

About

This repository contains a small daemon periodically pulling members of an autoscaling-group in AWS and writing a file-sd configuration for Prometheus

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published