Sign inSign up

rverchere/ovh-mks-exporter

By rverchere

Updated about 2 months ago

OVH Managed Kubernetes Service Prometheus Exporter

Image
Monitoring & observability
1

10K+

rverchere/ovh-mks-exporter repository overview

OVH Prometheus Exporter for Managed Kubernetes Clusters.

ci ci tests Plumber Score

Docker Stars Docker Pulls

This exporter retrieves some information from the OVHcloud API, which are not handled directly with k8s internal metrics:

  • etcd quota usage
  • up-to-date cluster version (to check if a security/patch upgrade is available)
  • general information of the clusters
  • instances information of the clusters
  • swift storage (objects and usage)

It retrieves metrics from all clusters and swift containers defined in a public cloud project.

This exporter is inspired by the https://github.com/enix/x509-certificate-exporter project, thanks to Enix team!

Prerequisites

You must generate OVHcloud API token here : https://eu.api.ovh.com/createToken/

The application uses only environment variables:

VariableRequiredDefaultDescription
OVH_ENDPOINTNoovh-euOVHcloud API endpoint
OVH_APPLICATION_KEYYesOVHcloud application key
OVH_APPLICATION_SECRETYesOVHcloud application secret
OVH_CONSUMER_KEYYesOVHcloud consumer key
OVH_CLOUD_PROJECT_SERVICEYesService name of the OVHcloud Public Cloud Project
OVH_LOG_LEVELNoinfoLog level: trace, debug, info, warn, error
OVH_MAX_RETRIESNo3Number of attempts on transient API errors (e.g. EOF). Each retry waits 1s, 2s, 4s… (exponential backoff)
OVH_S3_REGIONSNo(all regions)Comma-separated list of regions to scrape for S3 metrics (e.g. GRA,SBG,BHS). If unset, all regions are queried
OVH_LB_REGIONSNo(all regions)Comma-separated list of regions to scrape for Load Balancer metrics (e.g. GRA,SBG). If unset, all regions are queried

Installation

On a kubernetes environment, you have to:

  1. Create a secret `
kubectl create secret generic ovh-mks-exporter \
    --from-literal=OVH_ENDPOINT=ovh-eu \
    --from-literal=OVH_APPLICATION_KEY=${OVH_APPLICATION_KEY} \
    --from-literal=OVH_APPLICATION_SECRET=${OVH_APPLICATION_SECRET} \
    --from-literal=OVH_CONSUMER_KEY=${OVH_CONSUMER_KEY} \
    --from-literal=OVH_CLOUD_PROJECT_SERVICE=${OVH_CLOUD_PROJECT_SERVICE}
  1. Deploy application, service and servicemonitor using the helm chart in the deploymentfolder:
helm repo add ovh-mks-exporter https://rverchere.github.io/ovh-mks-exporter
helm repo update
helm upgrade --install ovh-mks-exporter ovh-mks-exporter/ovh-mks-exporter

The servicemonitor must be changed to match your prometheus installation (see prometheusReleaseNamein the values file).

Metrics

The following metrics are exported:

NameDescriptionValues
ovh_mks_cloud_infoPublic cloud projet information (id, name, description, status)1
ovh_mks_cluster_infoCluster information (id, name, region, status, etc)1
ovh_mks_cluster_isuptodateCluster is up to date (patch/security version)0 (no), 1 (yes)
ovh_mks_etcd_usage_quota_bytesETCD quota max usagebytes
ovh_mks_etcd_usage_usage_bytesETCD current usagebytes
ovh_mks_cluster_nodepool_infoNodepool information (id, name, nodes number, nodes flavor, etc)
ovh_mks_cluster_instance_infoInstance information (id, name, billing)1
ovh_storage_object_countSwift container object countcount
ovh_storage_object_bytesSwift container object usagebytes
ovh_s3_object_countS3 bucket object countcount
ovh_s3_object_bytesS3 bucket object bytesbytes
ovh_lb_infoLoad Balancer information (id, name, region, operating_status, provisioning_status, vip_address)1
ovh_lb_active_connectionsLoad Balancer active connectionscount
ovh_lb_bytes_in_totalLoad Balancer total bytes receivedbytes
ovh_lb_bytes_out_totalLoad Balancer total bytes sentbytes
ovh_lb_request_errors_totalLoad Balancer total request errorscount
ovh_lb_connections_totalLoad Balancer total connections handledcount
ovh_mks_scrape_duration_secondsDuration of the last metrics scrapeseconds
ovh_mks_exporter_build_infoExporter build information (version, goversion, goos, goarch)1

Example

Grafana Dashboard

Tag summary

Content type

Image

Digest

sha256:e7e5e14d8

Size

8.9 MB

Last updated

about 2 months ago

docker pull rverchere/ovh-mks-exporter