Prometheus Exporter for Fly.io
ghcr.io/dazwilkin/fly-exporter:2259d30abca1b0f24b7975811c49086d81532eec
TOKEN="[FLY-TOKEN]"
IMAGE="ghcr.io/dazwilkin/fly-exporter:2259d30abca1b0f24b7975811c49086d81532eec"
podman run \
--interactive --tty --rm \
--env=TOKEN=${TOKEN} \
--publish=8080:8080 \
${IMAGE} \
--endpoint=0.0.0.0:8080
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
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
fly-exporter container images are being signed by Sigstore and may be verified:
cosign verify \
--key=./cosign.pub \
ghcr.io/dazwilkin/fly-exporter:2259d30abca1b0f24b7975811c49086d81532eec
NOTE cosign.pub may be downloaded here
To install cosign
:
go install github.com/sigstore/cosign/cmd/cosign@latest
- Prometheus Exporter for Azure
- Prometheus Exporter for GCP
- Prometheus Exporter for Koyeb
- Prometheus Exporter for Linode
- Prometheus Exporter for Vultr