-
Notifications
You must be signed in to change notification settings - Fork 28
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
How do you add collated stats for providers like Hetzner ? #249
Comments
Hi @mrchrisadams, We have done some development on the API to make the contribution process easier. Take a look at the new documentation and try to contribute: https://doc.api.boavizta.org/contributing/cloud_provider/. Please let us know if the documentation is unclear so we can improve it. |
Oh, wow @da-ekchajzer this looks really cool! So if I understand this correctly, adding support would be something like:
Let's say I'm looking at the new arm64 servers tha Hetzner offer (mainly because there are fewer of them and it makes for a simpler example). I've attached a screenshot for clarity: I might need to figure out what the platform is, that actually 'contains' these instance types. For simplicity, I'm pretending that the largest instance type can also be the platform, a bit like the linked the AWS examples,where really big instances can effectively take up the platform's worth of capacity too. So, maybe something like this for the platform:
I can't remember if the CAX41 ones use SSDs or HDDs, but for the purposes of this example, it doesn't matter that much - I'd check the specs to see, and then add these. And then for the instances I need to list all the instance types. So for the smallest instance, it might look like CAX11, and we'd need one of these for each possible instance type (CAX11, CAX21, CAX31, etc)
For the Ampere range it would end up as a probably a CSV file which is about 4-5 lines long, based on the different instances offered. Is that in the right direction? I appreciate there is waaay more detail to add, but if that's broadly how it ought to work, then I can try contacting Hetzner to ask for help getting this together, and then thinking about how to contribute to the documentation. |
Here are some precisions/corrections : The process
This is a good option. You can also use a generic server (with no manufacturer) such as
Should be the number of CPU on the server 16 seems to be the number of vCPU
You should check the availability of the CPU in https://github.com/Boavizta/boaviztapi/blob/main/boaviztapi/data/crowdsourcing/cpu_specs.csv. If not available, you should add its specs. (see : https://doc.api.boavizta.org/contributing/cpu/)
Nop. The instance info should be define by the charachterictis define here : https://doc.api.boavizta.org/contributing/cloud_instance/
If you have some suggestions to improve the contribution documentation, feel free to give feed back or to improve it directly. |
Thanks @da-ekchajzer - I think this gives me enough to have a first go at getting this together 👍 I'll shoot for late next week. |
Hello Chris, any pain points collecting the data ? I stay available for further explanations. |
Problem
We use Hetzner for our cloud compute services, not AWS, and we want to try collecting figures for the environmental impact of running our existing services. We also use Scaleway for object storage, but much less of it, and there appear to be some issues already for them,
We're not sure how do to this with Boavista right now.
Solution
We'd like to understand how to use Boavista's API to collate figures on a per-host basis, so we can create similar metrics and dashboards as seen on the link below in the recent SDIA Green Coding workshop in Berlin:
https://docs.google.com/presentation/d/1yNR_buB9bQWlDzteBH06WYRWyjW0_sb7qm2q2X82j4U/edit#slide=id.g29e1bc192dd_0_196
Alternatives
We've also been looking at doing this in Cloud Carbon footprint, because they provide some scope for per-service level reporting, and (I think) reporting based on tags we apply to resources.
There's a fairly detailed issue linked below, and I started a PR a while ago, but haven't found the time to build a first version yet:
cloud-carbon-footprint/cloud-carbon-footprint#512 (comment)
Additional context or elements
We use Hetzner Cloud, not their physical servers via H-Robot.
This means we have limited access to the hardware, but we can still make some assumptions.
Hetzner provide a number of helpful APIs, some of which have been converted to expose some relevant info for grafana / prometheus style setups, although this may overlap with boavista's per-host agent approach.
https://promhippie.github.io/hcloud_exporter/
I believe this exporter queries the API exposed by Hetzner below:
https://docs.hetzner.cloud/
If it helps, we'd be happy to contribute an example to the docs of what a a setup using Boavista looks like, once we know how to do it.
The text was updated successfully, but these errors were encountered: