Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pricing does not include backups costs #15

Closed
ekeih opened this issue Mar 7, 2019 · 3 comments · Fixed by #18
Closed

Pricing does not include backups costs #15

ekeih opened this issue Mar 7, 2019 · 3 comments · Fixed by #18
Labels
enhancement New feature or request
Milestone

Comments

@ekeih
Copy link
Contributor

ekeih commented Mar 7, 2019

Hi,

first of all I want to say thank you for this cool exporter!

I found one little issue that bugs me and it is open for discussion if this is a bug or a feature request.The pricing metrics (hcloud_server_price_monthly and hcloud_server_price_hourly) contain only the base price of the server and do not include the additional 20% if backups are enabled.

  • The server endpoint includes the server type, if backups are enabled and the base price.
  • The pricing endpoint includes the percentage that is added to the price when backups are enabled.

I have several ideas what we could do with this information:

  1. We could add a hcloud_backup_price metric. Currently this would always be 0.2 or 20.0 but maybe Hetzner changes the percentage in the future.
  2. We could add a hcloud_server_backup metric that is 1 if the backup is enabled and 0 otherwise. Currently the only way to figure this out is to check hcloud_image_active{type="backup"} and this feels more like a workaround to me. By adding the hcloud_server_backup it would be possible to calculate the reals costs based on hcloud_server_backup and hcloud_server_price_monthly (e.g. in Grafana).
  3. We could change both existing pricing metrics to include the backup percentage. Or we could add additional metrics to avoid breaking changes.
  4. Based on the the information from the API we could add a metric that provides the costs that a server caused in the current month until now.

What I personally want to know in my dashboards/alerts is the fourth point but the other three points are ways to achieve the same by calculating the real costs inside of Grafana or the alert rules.

I am still pretty new to the Prometheus world and I have no idea if my proposals make any sense in regards of "what an exporter should do"-best-practices. So I am happy about any kind of feedback 🙂 Thanks for taking the time to read my message and please let me know if anything is unclear.

@tboerger
Copy link
Member

tboerger commented Mar 7, 2019

Hi, great to hear that this exporter is useful for you.

I would tend to 1 and 2, I'm not sure about 4 as this could be easy to calculate as you already said.

I think this exporter is already doing something a little bit different than the official exporters, but that's not a problem :D

@tboerger
Copy link
Member

tboerger commented Mar 8, 2019

Solved via #17

@tboerger tboerger closed this as completed Mar 8, 2019
@ekeih
Copy link
Contributor Author

ekeih commented Mar 8, 2019

#17 only implements 1. I would like to extend the server collector to provide hcloud_server_backup from my second point.

@tboerger tboerger added the enhancement New feature or request label Nov 3, 2021
@tboerger tboerger added this to the v0.2.0 milestone Nov 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants