prometheus-es-exporter

by braedon

Helm chartv0.2.0Verified publisher

Run queries on Elasticsearch and export the results as Prometheus metrics.

About this chart

Prometheus Elasticsearch Exporter

This Prometheus exporter collects metrics from queries run on an Elasticsearch cluster's data, and metrics about the cluster itself.

Source Code | Python Package | Docker Image | Helm Chart

Installation

Deploy prometheus-es-exporter on a Kubernetes cluster with the default configuration:

helm repo add braedon https://braedon.github.io/helm
helm repo update

helm install braedon/prometheus-es-exporter --name <release name> \
                                            --set elasticsearch.cluster=<elasticsearch nodes> \
                                            --set image.tag=<image tag>

Specify configuration via a YAML file:

helm install braedon/prometheus-es-exporter --name <release name> -f <config file>.yaml

Configuration

Available configurable parameters and their default values.

ParameterDescriptionDefault
elasticsearch.clusteraddresses of elasticsearch nodes to run queries onnone
elasticsearch.querieselasticsearch queries to runsee values.yaml
deployment.replicasexporter pod replicas to deploy1
pod.annotationsannotations to add to the exporter pods{}
pod.extraVolumesextra volumes to pass to the exporter pod[]
image.repositoryexporter docker image repositorybraedon/prometheus-es-exporter
image.tagexporter docker image tagnone
image.pullPolicyexporter docker image pull policyIfNotPresent
container.portexporter container metrics port9206
container.portNameexporter container metrics port nameprometheus
container.extraArgsextra arguments to pass to the exporter container[]
container.extraEnvextra env vars to pass to the exporter container[]
container.extraVolumeMountsextra volume mounts to pass to the exporter container[]
container.resourcesexporter container resource requests & limits{}
nodeSelectornode labels for exporter pod assignment{}
tolerationsnode taints to tolerate (requires Kubernetes >=1.6)[]
affinitynode/pod affinities (requires Kubernetes >=1.6){}
service.portexporter service port9206
service.portNameexporter service port nameprometheus
service.annotationsannotations to add to the exporter service{}

See the exporter README for details on the format of exporter options like elasticsearch.cluster.

See the example query config file for examples and explanations of query configurations for elasticsearch.queries.

Deploy prometheus-es-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-es-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 chartprometheus-es-exporter is pinned at v0.2.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