prometheus-pve-exporter
by Stenic
A Helm chart to export the metrics from pve in Prometheus format.
About this chart
prometheus-pve-exporter
TL;DR;
helm repo add stenic https://stenic.github.io/helm-charts
helm install my-release stenic/prometheus-pve-exporter
Introduction
A Prometheus exporter for Proxmox Virtual Environment metrics.
This chart bootstraps a PVE Exporter deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.8+ with Beta APIs enabled
Installing the Chart
To install the chart with the release name my-release:
helm repo add stenic https://stenic.github.io/helm-charts
helm install my-release stenic/prometheus-pve-exporter
These commands deploy prometheus-pve-exporter on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
Add the following to your prometheus configuration:
scrape_configs:
- job_name: 'pve'
static_configs:
- targets:
- 192.168.1.2 # Proxmox VE node.
- 192.168.1.3 # Proxmox VE node.
metrics_path: /pve
params:
module: [default]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: prometheus-pve-exporter:9221 # PVE exporter service.
The following tables list the configurable parameters of the prometheus-pve-exporter chart and their default values.
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | |
| image.pullPolicy | string | "IfNotPresent" | |
| image.repository | string | "prompve/prometheus-pve-exporter" | |
| image.tag | string | "" | |
| ingress.annotations | object | {} | |
| ingress.enabled | bool | false | |
| ingress.hosts | string | nil | |
| ingress.path | string | "/" | |
| ingress.tls | list | [] | |
| nodeSelector | object | {} | |
| pve.password | string | "sEcr3T" | |
| pve.target | string | nil | |
| pve.user | string | "prometheus@pve" | |
| pve.verify_ssl | bool | true | |
| rbac.create | bool | true | |
| rbac.pspEnabled | bool | true | |
| replicaCount | int | 1 | |
| resources | object | {} | |
| service.port | int | 9221 | |
| service.type | string | "ClusterIP" | |
| serviceAccount.create | bool | true | |
| serviceAccount.name | string | nil | |
| tolerations | list | [] |
Specify each parameter using the --set key=value[,key=value] argument to helm install.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
helm install my-release -f values.yaml stenic/prometheus-pve-exporter
Deploy prometheus-pve-exporter with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has prometheus-pve-exporter on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartprometheus-pve-exporter is pinned at v0.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply