koyeb-exporter

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

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

Prometheus Exporter for Koyeb

GitHub Actions Go Reference Go Report Card

  • ghcr.io/dazwilkin/koyeb-exporter:a0d060c54896f9094dd17ec562ed0859759f332a

Exports Koyeb (Apps, Deployments, Instances) to enable e.g. (Prometheus) Alerting on Koyeb resource consumption ($$$).

Run

koyeb-exporter

TOKEN=$(more ~/.koyeb.yaml | yq .token) # Koyeb API Token

PORT="..."

podman run \
--interactive --tty --rm \
--env=TOKEN=${TOKEN} \
ghcr.io/dazwilkin/koyeb-exporter:a0d060c54896f9094dd17ec562ed0859759f332a \
--endpoint=":${PORT} \
--path=/metrics

Metrics

All metric names are prefix koyeb_

Name Type Description
apps_up Gauge 1 if the App is up, 0 otherwise
credentials_up Gauge 1 if the Credential is up, 0 otherwise
deployments_up Gauge 1 if the Deployment is up, 0 otherwise
domains_up Gauge 1 if the Domain is up, 0 otherwise
exporter_build_info Counter A metric with a constant '1' value labeled by OS version, Go version, and the Git commit of the exporter
exporter_start_time Gauge Exporter start time in Unix epoch seconds
instances_up Gauge 1 if the instance is up, 0 otherwise
secrets_up Gauge 1 if the Secret is up, 0 otherwise
services_up Gauge 1 if the Service is up, 0 otherwise

Prometheus

VERS="v2.45.0"

# Binds to host network to scrape Koyeb Exporter
podman run \
--interactive --tty --rm \
--net=host \
--volume=${PWD}/prometheus.yml:/etc/prometheus/prometheus.yml \
--volume=${PWD}/rules.yml:/etc/alertmanager/rules.yml \
quay.io/prometheus/prometheus:${VERS} \
  --config.file=/etc/prometheus/prometheus.yml \
  --web.enable-lifecycle

See prometheus.yml

Alerting Rules

See rules.yml

Sigstore

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

cosign verify \
--key=./cosign.pub \
ghcr.io/dazwilkin/koyeb-exporter:a0d060c54896f9094dd17ec562ed0859759f332a

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