vmware-exporter

by Helm

Helm chartv2.3.0App v0.18.4

VMware vCenter Exporter for Prometheus Helm chart

About this chart

VMWare_exporter Helm Chart

TL;DR;

$ helm install kremers/vmware-exporter

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release kremers/vmware-exporter

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

ParameterDescriptionDefault
replicaCountNumber of nodes1
livenessProbeLiveness Probe settings{ "httpGet": { "path": "/healthz", "port": 9272 } "initialDelaySeconds": 30, "failureThreshold": 10}
readinessProbeRediness Probe settings{ "httpGet": { "path": "/healthz", "port": 9272 }
image.repositoryImage repositorypryorda/vmware_exporter
image.tagImage tag. (Must be >= 0.7.4)v0.10.4
image.pullPolicyImage pull policyIfNotPresent
service.enabledEnable a service for vmware_exporterfalse
service.typeKubernetes service typeClusterIP
service.portKubernetes port where service is exposed80
service.targetPortinternal service is port9272
service.annotationsService annotations{}
service.labelsCustom labels{}
podAnnotationspodAnnotations i.e. for prometheus scraping{prometheus.io/scrape: "true", prometheus.io/port: "9272", prometheus.io/path: "/metrics"}
ingress.enabledEnables Ingressfalse
ingress.annotationsIngress annotations{}
ingress.labelsCustom labels{}
ingress.pathIngress accepted path/
ingress.hostsIngress accepted hostnames[]
ingress.tlsIngress TLS configuration[]
resourcesCPU/Memory resource requests/limits{}
nodeSelectorNode labels for pod assignment{}
tolerationsToleration labels for pod assignment[]
affinityAffinity settings for pod assignment{}
 securityContextSecurity Context for the Container{}
podSecurityContextSecurity Context for the Pod{}
vsphere.userUser for vcenter loginuser
vsphere.passwordPassword for vcenter loginna
vsphere.existingSecretProvide password for vCenter login w/ secret
vsphere.hostHostname or IP for vcenter loginvcenter
vsphere.ignoresslUser for vcenteruser
vsphere.collectors.hostsCollect host metricstrue
vsphere.collectors.datastoresCollect datastore metricstrue
vsphere.collectors.vmsCollect vm metricstrue
vsphere.sectionsAdd additional configuraiton sections via environment variables[]]

Example of vcenter configuration

vsphere:
  user: user
  password: somepassword
  host: vcenter.someCompany.com
  ignoressl: false
  collectors:
    hosts: true
    datastores: true
    vms: true

Sharding the exporter for different vcenter instances

If different tenants are configured that have restricted visibility to specific folders, metrics can be sharded. This will allow a setup like:

Prometheus customer(A) => VMWare exporter customer(A) => VCenter restricted access for customer(A) Prometheus customer(B) => VMWare exporter customer(B) => VCenter restricted access for customer(B)

Some Grafana dashboard, connected to a datasource with mixed content will allow access to the whole underlying datasource with VIEWER privileges.

To enable seperation in the K8S autodiscovery to the following:

podAnnotations:
  yourcustomannotation/scrape: "true"
  yourcustomannotation/port: "9272"
  prometheus.io/scrape: null
  prometheus.io/port: null
  prometheus.io/path: null

The scraping of Prometheus can be configured, adding additionalScrapeConfig parts or replacing prometheus.yml (most common for sharded data):

Parametrize the stable/prometheus chart like in the following example, take care for yourcustomannotation:

serverFiles:
  prometheus.yml:
    rule_files:
    - /etc/config/rules
    - /etc/config/alerts
    scrape_configs:
    - job_name: prometheus
      static_configs:
      - targets:
        - localhost:9090
    - job_name: 'k8s-yourcustomannotation'
      kubernetes_sd_configs:
      - role: pod
      relabel_configs:
      - source_labels: [__meta_kubernetes_pod_annotation_yourcustomannotation_scrape]
        separator: ;
        regex: "true"
        replacement: $1
        action: keep
      - source_labels: [__meta_kubernetes_pod_annotation_yourcustomannotation _path]
        separator: ;
        regex: (.+)
        target_label: __metrics_path__
        replacement: $1
        action: replace
      - source_labels: [__address__, __meta_kubernetes_pod_annotation_yourcustomannotation _port]
        separator: ;
        regex: ([^:]+)(?::\d+)?;(\d+)
        target_label: __address__
        replacement: $1:$2
        action: replace
kubeStateMetrics:
  enabled: false
nodeExporter:
  enabled: false
pushgateway:
  enabled: false
alertmanager:
  enabled: false
alertmanagerFiles:
  alertmanager.yml: ""

Deploy vmware-exporter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has vmware-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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartvmware-exporter is pinned at v2.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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