fly-exporter

command module
v0.0.0-...-e13b0d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2025 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Prometheus Exporter for Fly.io

build-container Go Reference Go Report Card

  • ghcr.io/dazwilkin/fly-exporter:9737834ab7350e2267cd1a0f755e3b29a1e05de2

Container

TOKEN="[FLY-TOKEN]"
IMAGE="ghcr.io/dazwilkin/fly-exporter:9737834ab7350e2267cd1a0f755e3b29a1e05de2"

podman run \
--interactive --tty --rm \
--env=TOKEN=${TOKEN} \
--publish=8080:8080 \
${IMAGE} \
  --endpoint=0.0.0.0:8080

Metrics

curl http://localhost:8080/metrics

Yields:

# HELP build_info A metric with a constant '1' value labeled by OS version, Go version, and the Git commit of the exporter
# TYPE build_info counter
build_info{git_commit="897f2bbe476e834c9a3a0b53784c5d0360bfb5f9",go_version="go1.18.2",os_version="5.15.32-v8+"} 1
# HELP fly_exporter_app_info Info about Applications
# TYPE fly_exporter_app_info counter
fly_exporter_app_info{deployed="true",id="foo",name="foo",org_slug="personal",status="running"} 1
fly_exporter_app_info{deployed="true",id="foo",name="foo",org_slug="personal",status="running"} 1
# HELP fly_exporter_cert_info Info about Certificates
# TYPE fly_exporter_cert_info counter
fly_exporter_cert_info{app_id="foo",app_name="foo",status="Awaiting certificates"} 1
# HELP start_time Exporter start time in Unix epoch seconds
# TYPE start_time gauge
start_time 1.652975685e+09

Raspberry Pi

if [ "$(getconf LONG_BIT)" -eq 64 ]
then
  # 64-bit Raspian
  ARCH="GOARCH=arm64"
  TAG="arm64"
else
  # 32-bit Raspian
  ARCH="GOARCH=arm GOARM=7"
  TAG="arm32v7"
fi


IMAGE="ghcr.io/dazwilkin/fly-exporter:${TAG}"

podman build \
--build-arg=GOLANG_OPTIONS="CGO_ENABLED=0 GOOS=linux ${ARCH}" \
--build-arg=COMMIT=$(git rev-parse HEAD) \
--build-arg=VERSION=$(uname --kernel-release) \
--tag={IMAGE} \
--file=./Dockerfile \
.

Then:

POD="exporter"
IMAGE="ghcr.io/dazwilkin/fly-exporter:${TAG}"

podman run \
--detach --tty --rm \
--pod=${POD} \
--name=fly-exporter \
--env=TOKEN=${TOKEN} \
${IMAGE} \
  --endpoint=0.0.0.0:8080

Sigstore

fly-exporter container images are being signed by Sigstore and may be verified:

cosign verify \
--key=./cosign.pub \
ghcr.io/dazwilkin/fly-exporter:9737834ab7350e2267cd1a0f755e3b29a1e05de2

NOTE cosign.pub may be downloaded here

To install cosign:

go install github.com/sigstore/cosign/cmd/cosign@latest

Similar Exporters



Buy Me A Coffee

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址