This is a Prometheus exporter for the OVH cloud API.
The OVH API uses a signed token, generated by their SDK, using an app key/secret and consumer secret. The full process is described in https://docs.ovh.com/gb/en/api/first-steps-with-ovh-api/#advanced-usage-pair-ovhcloud-apis-with-an-application_2.
- Sign up as a new app using the
/createToken
endpoint for your selected API, such as https://api.us.ovhcloud.com/createToken/ - Put the resulting secrets in an
.env
file or k8s secret - Mount or source those secrets before running
node index.js
The following environment variables must be set:
OVH_ENDPOINT
- the name of the API endpoint to be used
- like
ovh-ca
,ovh-eu
,ovh-us
OVH_APP
- the application key, AK in the docs
OVH_SECRET
- the secret application key, AS in the docs
OVH_CONSUMER
- the secret consumer key, CK in the docs
OVH_PROJECT
- the ID of your public cloud project
The API has a number of GET endpoints that expose project usage and quota information. Some of these are collected and exposed as Prometheus metrics.
ovh_project_quota_max
region
- name
resource
cores
instances
memory
ovh_project_quota_used
region
- name
resource
cores
instances
memory
ovh_swift_bucket_bytes_total
bucket
- name
region
- name
ovh_swift_bucket_objects_total
bucket
- name
region
- name
Metrics are fetched once on startup, then on a scheduled interval, by default every 10 minutes.