prometheus-elasticsearch-exporter
by Prometheus
Elasticsearch stats exporter for Prometheus
About this chart
Prometheus Elasticsearch Exporter
Prometheus exporter for various metrics about Elasticsearch, written in Go. For more information, please, see the project's repository.
This chart creates an Elasticsearch exporter deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Helm 3.7+
- Kubernetes 1.19+
Usage
The chart is distributed as an OCI Artifact as well as via a traditional Helm Repository.
- OCI Artifact:
oci://ghcr.io/prometheus-community/charts/prometheus-elasticsearch-exporter - Helm Repository:
https://prometheus-community.github.io/helm-chartswith chartprometheus-elasticsearch-exporter
The installation instructions use the OCI registry. Refer to the [helm repo](helm repo) command documentation for information on installing charts via the traditional repository.
Install Helm Chart
helm install [RELEASE_NAME] oci://ghcr.io/prometheus-community/charts/prometheus-elasticsearch-exporter
The command deploys Elasticsearch Exporter on the Kubernetes cluster using the default configuration.
See configuration below.
See helm install for command documentation.
Uninstall Helm Chart
helm uninstall [RELEASE_NAME]
This removes all the Kubernetes components associated with the chart and deletes the release.
See helm uninstall for command documentation.
Upgrading Helm Chart
helm upgrade [RELEASE_NAME] oci://ghcr.io/prometheus-community/charts/prometheus-elasticsearch-exporter --install
See helm upgrade for command documentation.
To 8.0.0
The exporter Pod no longer mounts a Kubernetes service account token: serviceAccount.automountServiceAccountToken
now defaults to false and also applies to the Pod, not only to a ServiceAccount created by the chart. The exporter does
not call the Kubernetes API. If you add containers that need API credentials, set it back to true.
podSecurityContext.runAsGroup now defaults to 1000, so the exporter no longer runs with the root group (GID 0).
The Pod spec changes, so the exporter restarts once on upgrade.
To 7.0.0
In Release 7.0.0, the chart has dropped support for PodSecurityPolicy, which was removed in k8s 1.25.
To 6.0.0
In release 6.0, the chart API version has been increased to v2. From now on, the chart supports Helm 3 only.
The minimum Kubernetes version supported by the chart has been raised to 1.19.
Labels and selectors have been replaced following Helm 3 label and annotation best practices:
| Previous | Current |
|---|---|
| app | app.kubernetes.io/name |
| chart | helm.sh/chart |
| [none] | app.kubernetes.io/version |
| heritage | app.kubernetes.io/managed-by |
| release | app.kubernetes.io/instance |
As the change is affecting immutable selector labels, the deployment must be deleted before upgrading the release, e.g.:
kubectl delete deploy -l app=prometheus-elasticsearch-exporter
Once the resources have been deleted, you can upgrade the release:
helm upgrade -i RELEASE_NAME prometheus-community/prometheus-elasticsearch-exporter
To 5.0.0
securityContext has been renamed to podSecurityContext and securityContext.enabled has no effect anymore. To mirror the behaviour of securityContext.enabled=false of 4.x unset podSecurityContext.
helm install --set podSecurityContext=null my-exporter stable/elasticsearch-exporter
In 5.0.0 securityContext refers to the container's securityContext instead which was not configurable in earlier versions. The naming is aligned with the base charts created by Helm.
Default values for podSecurityContext and securityContext have been updated to be compatible with the Pod Security Standard level "restricted". Most notably seccompProfile.type is set to RuntimeDefault.
To 4.0.0
While migrating the chart from stable/elasticsearch-exporter it was renamed to prometheus-elasticsearch-exporter.
If you want to upgrade from a previous version and you need to keep the old resource names (Service, Deployment, etc) you can set fullnameOverride and nameOverride to do so.
The example below shows how those values should be set for a my-exporter release of the previous chart.
helm install my-exporter stable/elasticsearch-exporter
helm upgrade my-exporter . --set fullnameOverride=my-exporter-elasticsearch-exporter --set nameOverride=elasticsearch-exporter
To 3.0.0
prometheusRule.rules are now processed as Helm template, allowing to set variables in them.
This means that if a rule contains a {{ $value }}, Helm will try replacing it and probably fail.
You now need to escape the rules (see values.yaml) for examples.
To 2.0.0
Some Kubernetes APIs used from 1.x have been deprecated. You need to update your cluster to Kubernetes 1.10+ to support new definitions used in 2.x.
Configuration
See Customizing the Chart Before Installing. To see all configurable options with detailed comments, visit the chart's values.yaml, or run these configuration commands:
helm show values oci://ghcr.io/prometheus-community/charts/prometheus-elasticsearch-exporter
Tip: You can use the default values.yaml
Deploy prometheus-elasticsearch-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-elasticsearch-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-elasticsearch-exporter is pinned at v8.2.0 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