No description
Find a file
dependabot[bot] 076378993b Bump github.com/hetznercloud/hcloud-go from 1.29.1 to 1.32.0
Bumps [github.com/hetznercloud/hcloud-go](https://github.com/hetznercloud/hcloud-go) from 1.29.1 to 1.32.0.
- [Release notes](https://github.com/hetznercloud/hcloud-go/releases)
- [Changelog](https://github.com/hetznercloud/hcloud-go/blob/master/CHANGES.md)
- [Commits](https://github.com/hetznercloud/hcloud-go/compare/v1.29.1...v1.32.0)

---
updated-dependencies:
- dependency-name: github.com/hetznercloud/hcloud-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-24 09:35:01 +02:00
.github Create dependabot.yml 2021-07-24 17:36:40 +02:00
fetcher Calculate correct backup price percentage 2021-05-31 12:51:50 +02:00
helm/hcloud-pricing-exporter Add helm release for 0.3.2 2021-06-18 20:12:58 +02:00
.chartreleaser.yaml Add helm chart for easy deployment 2021-03-06 17:13:57 +01:00
.editorconfig Prepare initial project layout 2021-03-05 16:35:29 +01:00
.gitignore Prepare initial project layout 2021-03-05 16:35:29 +01:00
.golangci.yml Prepare initial project layout 2021-03-05 16:35:29 +01:00
.goreleaser.yml Fix build target and linting issues 2021-03-05 21:02:07 +01:00
dependabot.yml Create dependabot.yml 2021-06-20 00:22:59 +02:00
Dockerfile Fix build target and linting issues 2021-03-05 21:02:07 +01:00
go.mod Bump github.com/hetznercloud/hcloud-go from 1.29.1 to 1.32.0 2021-08-24 09:35:01 +02:00
go.sum Bump github.com/hetznercloud/hcloud-go from 1.29.1 to 1.32.0 2021-08-24 09:35:01 +02:00
LICENSE Prepare initial project layout 2021-03-05 16:35:29 +01:00
main.go Reset metrics to prevent deleted resources showing up 2021-03-13 23:40:18 +01:00
README.md Add artifact hub badge 2021-03-06 18:11:34 +01:00
version.yaml Add helm release for 0.3.2 2021-06-18 20:12:58 +02:00

hcloud-pricing-exporter

Build Status PkgGoDev Go Report Card Docker Pulls Artifact HUB

A Prometheus exporter that connects to your HCloud account and collects data on your current expenses. The aim is to make cost of cloud infrastructure more transparent and manageable, especially for private projects.

Please note that no guarantees on correctness are made and any financial decisions should be always be based on the billing and cost functions provided by HCloud itself. Some hourly costs are estimations based on monthly costs, if the HCloud API does not provide an hourly expense.

Deployment

To run the exporter from the CLI you need to run the following commands:

# Just run it with the default settings
./hcloud-pricing-exporter -hcloud-token <TOKEN>

# Get the token from an ENV variable
export HCLOUD_TOKEN=<TOKEN>
./hcloud-pricing-exporter

# Run the exporter on a different port with another fetch interval
./hcloud-pricing-exporter -port 1234 -fetch-interval 45m

Alternatively, the exporter can be run by using the provided docker image:

docker run jangraefen/hcloud-pricing-exporter:latest -e HCLOUD_TOKEN=<TOKEN> -p 8080:8080

If you want to deploy the exporter to a Kubernetes environment, you can use the provided helm chart. Just perform the following commands:

helm repo add hcloud-pricing-exporter https://jangraefen.github.io/hcloud-pricing-exporter
helm repo update
helm upgrade --install hcloud-pricing-exporter hcloud-pricing-exporter/hcloud-pricing-exporter

Exported metrics

  • hcloud_pricing_floatingip_hourly{name, location} (Estimated based on the monthly price)
  • hcloud_pricing_floatingip_monthly{name, location}
  • hcloud_pricing_loadbalancer_hourly{name, location, type}
  • hcloud_pricing_loadbalancer_monthly{name, location, type}
  • hcloud_pricing_server_hourly{name, location, type}
  • hcloud_pricing_server_monthly{name, location, type}
  • hcloud_pricing_server_backups_hourly{name, location, type}
  • hcloud_pricing_server_backups_monthly{name, location, type}
  • hcloud_pricing_server_traffic_hourly{name, location, type} (Estimated based on the monthly price)
  • hcloud_pricing_server_traffic_monthly{name, location, type}
  • hcloud_pricing_snapshot_hourly{name} (Estimated based on the monthly price)
  • hcloud_pricing_snapshot_monthly{name}
  • hcloud_pricing_volume_hourly{name, location, bytes} (Estimated based on the monthly price)
  • hcloud_pricing_volume_monthly{name, location, bytes}