github.com/Jimdo/autoscaling-file-sd


Properties

Last built 9 months ago using go version go1.6.2 linux/amd64 and 198 seconds of time

Downloads
Filename
File Size
 
autoscaling-file-sd_master_darwin-386.zip
3.7MiB
autoscaling-file-sd_master_darwin-amd64.zip
4.0MiB
autoscaling-file-sd_master_linux-386.zip
3.7MiB
autoscaling-file-sd_master_linux-amd64.zip
3.9MiB
autoscaling-file-sd_master_linux-arm.zip
3.6MiB
autoscaling-file-sd_master_windows-386.zip
3.6MiB
autoscaling-file-sd_master_windows-amd64.zip
3.9MiB
Project-Readme for this version

Download on GoBuilder 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"
    ]
  }
]