Giter Club home page Giter Club logo

hcloud-pricing-exporter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hcloud-pricing-exporter's Issues

Helm installation instructions don't work

I'm not sure if this is something common, as I don't have a lot of experience using Helm, but upon trying to install following the given instructions, I get the following:

Error: INSTALLATION FAILED: file '/Users/kscarlett/Library/Caches/helm/repository/hcloud-pricing-exporter' does not appear to be a gzipped archive; got 'text/html; charset=utf-8'

This might be related to how the chart it is deployed? I have been able to install Traefik and a couple of other applications through Helm.

Pagination limit for fetcher?

Hi my project has more cloud servers in environment, but it seems exporter is limited by default, fetching only 25 results or it's some dependancy on another lib like hcloud as I could not find '25' in this repo?

How can I overcome this limitation in the exporter?

I saw in code there is:

import
"github.com/hetznercloud/hcloud-go/hcloud"

...
client.Server.List(ctx, hcloud.ServerListOpts{})

Result:

curl localhost:8080/metrics | grep server_monthly | grep -v -e "# HELP" -e "# TYPE" | wc -l
25
curl https://api.hetzner.cloud/v1/servers
  "meta": {
    "pagination": {
      "page": 1,
      "per_page": 25,
      "previous_page": null,
      "next_page": 2,
      "last_page": 4,
      "total_entries": 100
    }
  }

--
(edit)

https://github.com/hetznercloud/hcloud-go/

 import (
-  "github.com/hetznercloud/hcloud-go/hcloud"
+  "github.com/hetznercloud/hcloud-go/v2/hcloud"
 )

v1 is supported until September 1st 2023 with new features, so I guess it will need some updating to v2 in the future as well..

Server backup costs off by factor of 100

Describe the bug

I think that the monthly costs (haven't checked the daily ones) for server backups are off by a factor of 100.

To Reproduce
Steps to reproduce the behavior:

  1. Create servers with backups enabled.
  2. Check server prices and server backup prices.

Screenshot
image

I calculated the right backup costs. They're exactly 23.228 which is what's displayed divided by 100.

Expected behavior
That server backup prices are ~10% of the server prices.

Additional context
I think the error is the following:

  • Here you get a percentage from the Hetzner API, i.e., 10.
  • Then you multiply with the server prices without adjusting the percentage, i.e., without dividing by 100.

Error with the new IP pricing

Hey there, I just updated the container to the newest version and unfortunately it crashes with the following error:

goroutine 1 [running]:
github.com/jangraefen/hcloud-pricing-exporter/fetcher.Fetchers.MustRun(...)
	/app/fetcher/fetcher.go:97
main.main()
	/app/main.go:62 +0xbae
panic: 1 error(s) occurred:
* no primary IP pricing found for datacenter fsn1-dc14

Maybe this only affects instances in fsn1-dc14?

(btw thank you so much for this tool, it worked great for me in the last months)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.