{"id":13702706,"url":"https://github.com/jangraefen/hcloud-pricing-exporter","last_synced_at":"2025-05-05T04:31:20.036Z","repository":{"id":37087964,"uuid":"344850478","full_name":"jangraefen/hcloud-pricing-exporter","owner":"jangraefen","description":"A prometheus exporter for the current pricing and costs of your HCloud account","archived":false,"fork":false,"pushed_at":"2025-01-08T23:05:40.000Z","size":246,"stargazers_count":56,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T23:50:31.266Z","etag":null,"topics":["hcloud","hetzner","hetzner-cloud","prometheus","prometheus-exporter","prometheus-metrics"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jangraefen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-05T15:21:57.000Z","updated_at":"2025-01-08T23:05:31.000Z","dependencies_parsed_at":"2023-09-23T22:37:13.602Z","dependency_job_id":"c60e8976-4e60-4eb7-b769-a89ad691cb82","html_url":"https://github.com/jangraefen/hcloud-pricing-exporter","commit_stats":{"total_commits":164,"total_committers":8,"mean_commits":20.5,"dds":0.5975609756097561,"last_synced_commit":"b6b53a850d4b6dd54736395c57de13b7ef46fb39"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jangraefen%2Fhcloud-pricing-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jangraefen%2Fhcloud-pricing-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jangraefen%2Fhcloud-pricing-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jangraefen%2Fhcloud-pricing-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jangraefen","download_url":"https://codeload.github.com/jangraefen/hcloud-pricing-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252439583,"owners_count":21748038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hcloud","hetzner","hetzner-cloud","prometheus","prometheus-exporter","prometheus-metrics"],"created_at":"2024-08-02T21:00:41.096Z","updated_at":"2025-05-05T04:31:19.743Z","avatar_url":"https://github.com/jangraefen.png","language":"Go","funding_links":[],"categories":["Tools"],"sub_categories":["Rust"],"readme":"# hcloud-pricing-exporter\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/jangraefen/hcloud-pricing-exporter/build.yaml?branch=main\u0026logo=GitHub)](https://github.com/jangraefen/hcloud-pricing-exporter/actions?query=workflow:Build)\n[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/jangraefen/hcloud-pricing-exporter)](https://pkg.go.dev/mod/github.com/jangraefen/hcloud-pricing-exporter)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jangraefen/hcloud-pricing-exporter)](https://goreportcard.com/report/github.com/jangraefen/hcloud-pricing-exporter)\n[![Docker Pulls](https://img.shields.io/docker/pulls/jangraefen/hcloud-pricing-exporter)](https://hub.docker.com/r/jangraefen/hcloud-pricing-exporter)\n[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/hcloud-pricing-exporter)](https://artifacthub.io/packages/search?repo=hcloud-pricing-exporter)\n\nA Prometheus exporter that connects to your HCloud account and collects data on your current expenses. The aim is to\nmake cost of cloud infrastructure more transparent and manageable, especially for private projects.\n\nPlease note that no guarantees on correctness are made and any financial decisions should be always be based on the\nbilling and cost functions provided by HCloud itself. Some hourly costs are estimations based on monthly costs, if the\nHCloud API does not provide an hourly expense.\n\n## Deployment\n\nTo run the exporter from the CLI you need to run the following commands:\n\n```shell\n# Just run it with the default settings\n./hcloud-pricing-exporter -hcloud-token \u003cTOKEN\u003e\n\n# Get the token from an ENV variable\nexport HCLOUD_TOKEN=\u003cTOKEN\u003e\n./hcloud-pricing-exporter\n\n# Run the exporter on a different port with another fetch interval\n./hcloud-pricing-exporter -port 1234 -fetch-interval 45m\n```\n\nAlternatively, the exporter can be run by using the provided docker image:\n\n```shell\ndocker run jangraefen/hcloud-pricing-exporter:latest -e HCLOUD_TOKEN=\u003cTOKEN\u003e -p 8080:8080\n```\n\nIf you want to deploy the exporter to a Kubernetes environment, you can use the provided helm chart. Just perform the\nfollowing commands:\n\n```shell\nhelm repo add hcloud-pricing-exporter https://jangraefen.github.io/hcloud-pricing-exporter\nhelm repo update\nhelm upgrade --install hcloud-pricing-exporter hcloud-pricing-exporter/hcloud-pricing-exporter --version {VERSION}\n```\n\n## Exported metrics\n\n- `hcloud_pricing_floatingip_hourly{name, location, type}` _(Estimated based on the monthly price)_\n- `hcloud_pricing_floatingip_monthly{name, location, type}`\n- `hcloud_pricing_loadbalancer_hourly{name, location, type}`\n- `hcloud_pricing_loadbalancer_monthly{name, location, type}`\n- `hcloud_pricing_primaryip_hourly{name, datacenter, type}`\n- `hcloud_pricing_primaryip_monthly{name, datacenter, type}`\n- `hcloud_pricing_server_hourly{name, location, type}`\n- `hcloud_pricing_server_monthly{name, location, type}`\n- `hcloud_pricing_server_backups_hourly{name, location, type}`\n- `hcloud_pricing_server_backups_monthly{name, location, type}`\n- `hcloud_pricing_server_traffic_hourly{name, location, type}` _(Estimated based on the monthly price)_\n- `hcloud_pricing_server_traffic_monthly{name, location, type}`\n- `hcloud_pricing_snapshot_hourly{name}` _(Estimated based on the monthly price)_\n- `hcloud_pricing_snapshot_monthly{name}`\n- `hcloud_pricing_volume_hourly{name, location, bytes}` _(Estimated based on the monthly price)_\n- `hcloud_pricing_volume_monthly{name, location, bytes}`\n\nEach exported metric can also be enriched with additional labels, coming from the actual labels on the Hetzner resource.\nTo expose additional labels, use the `-additional-labels label1,label2,...` command line parameter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjangraefen%2Fhcloud-pricing-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjangraefen%2Fhcloud-pricing-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjangraefen%2Fhcloud-pricing-exporter/lists"}