Prometheus Exporter of Koyeb resources (primarily to alert on cost)

koyeb-exporter.

A very basic (!) Prometheus Exporter of Koyeb resources.

This is not an exporter of Koyeb metrics

I deploy resources to multiple cloud platforms and it’s useful to alert on the existence of resources in order to manage costs:

  • Number of Apps deployed
  • Number of Instances deployed

All metrics 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

I struggle with metric naming (suggestions welcome). I’m using up for “exists” and, because not every Koyeb resource includes a status field and, when they do, it’s not always obvious whether the status should map to 0, the values are only ever 1 which is… incomplete.

It is trivial to add additional Koyeb resource types thanks to the Koyeb API and Go SDK

4 Likes