Back to Charts

Elasticsearch Exporter

stable/elasticsearch-exporter/README.md

latest7.2 KB
Original Source

Elasticsearch Exporter

DEPRECATED and moved to https://github.com/prometheus-community/helm-charts

Prometheus exporter for various metrics about ElasticSearch, written in Go.

Learn more: https://github.com/justwatchcom/elasticsearch_exporter

TL;DR;

bash
$ helm install stable/elasticsearch-exporter

Introduction

This chart creates an Elasticsearch-Exporter deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.10+

Installing the Chart

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

bash
$ helm install --name my-release stable/elasticsearch-exporter

The command deploys Elasticsearch-Exporter on the Kubernetes cluster using the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

bash
$ helm delete --purge my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Upgrading an existing Release to a new major version

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

To 2.0.0

Some kubernetes apis used from 1.x have been deprecated. You need to update your claster to kubernetes 1.10+ to support new definitions used in 2.x.

Configuration

The following table lists the configurable parameters of the Elasticsearch-Exporter chart and their default values.

ParameterDescriptionDefault
replicaCountdesired number of pods1
restartPolicycontainer restart policyAlways
image.repositorycontainer image repositoryjustwatch/elasticsearch_exporter
image.tagcontainer image tag1.1.0
image.pullPolicycontainer image pull policyIfNotPresent
image.pullSecretcontainer image pull secret""
resourcesresource requests & limits{}
priorityClassNamepriorityClassNamenil
nodeSelectorNode labels for pod assignment{}
tolerationsNode tolerations for pod assignment{}
podAnnotationsPod annotations{}
podSecurityPolicies.enabledEnable/disable PodSecurityPolicy and associated Role/Rolebinding creationfalse
serviceAccount.createCreate a ServiceAccount for the podfalse
serviceAccount.nameName of a ServiceAccount to use that is not handled by this chartdefault
service.typetype of service to createClusterIP
service.httpPortport for the http service9108
service.metricsPort.namename for the http servicehttp
service.annotationsAnnotations on the http service{}
service.labelsAdditional labels for the service definition{}
envExtra environment variables passed to pod{}
extraEnvSecretsExtra environment variables passed to the pod from k8s secrets - see values.yaml for an example{}
envFromSecretThe name of an existing secret in the same kubernetes namespace which contains values to be added to the environmentnil
secretMountslist of secrets and their paths to mount inside the pod[]
affinityAffinity rules{}
es.uriaddress of the Elasticsearch node to connect tolocalhost:9200
es.allif true, query stats for all nodes in the cluster, rather than just the node we connect totrue
es.indicesif true, query stats for all indices in the clustertrue
es.indices_settingsif true, query settings stats for all indices in the clustertrue
es.shardsif true, query stats for shards in the clustertrue
es.cluster_settingsif true, query stats for cluster settingstrue
es.snapshotsif true, query stats for snapshots in the clustertrue
es.timeouttimeout for trying to get stats from Elasticsearch30s
es.ssl.enabledIf true, a secure connection to Elasticsearch cluster is usedfalse
es.ssl.useExistingSecretsIf true, certs from secretMounts will be usedfalse
es.ssl.ca.pemPEM that contains trusted CAs used for setting up secure Elasticsearch connection
es.ssl.ca.pathPath of ca pem file which should match a secretMount path
es.ssl.client.enabledIf true, use SSL client certificates for authenticationtrue
es.ssl.client.pemPEM that contains the client cert to connect to Elasticsearch
es.ssl.client.pemPathPath of client pem file which should match a secretMount path
es.ssl.client.keyPrivate key for client auth when connecting to Elasticsearch
es.ssl.client.keyPathPath of client key file which should match a secretMount path
web.pathpath under which to expose metrics/metrics
serviceMonitor.enabledIf true, a ServiceMonitor CRD is created for a prometheus operatorfalse
serviceMonitor.namespaceIf set, the ServiceMonitor will be installed in a different namespace""
serviceMonitor.labelsLabels for prometheus operator{}
serviceMonitor.intervalInterval at which metrics should be scraped10s
serviceMonitor.scrapeTimeoutTimeout after which the scrape is ended10s
serviceMonitor.schemeScheme to use for scrapinghttp
serviceMonitor.relabelingsRelabel configuration for the metrics[]
serviceMonitor.targetLabelsSet of labels to transfer on the Kubernetes Service onto the target.[]
serviceMonitor.metricRelabelingsMetricRelabelConfigs to apply to samples before ingestion.[]
serviceMonitor.sampleLimitNumber of samples that will fail the scrape if exceeded0
prometheusRule.enabledIf true, a PrometheusRule CRD is created for a prometheus operatorfalse
prometheusRule.namespaceIf set, the PrometheusRule will be installed in a different namespace""
prometheusRule.labelsLabels for prometheus operator{}
prometheusRule.rulesList of PrometheusRules to be created, check values for an example.[]
log.formatFormat used for the logs. Valid formats are json and logfmtlogfmt
log.levelLogging level to be used. Valid levels are debug, info, warn, errorinfo

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

bash
$ helm install --name my-release \
    --set key_1=value_1,key_2=value_2 \
    stable/elasticsearch-exporter

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

bash
# example for staging
$ helm install --name my-release -f values.yaml stable/elasticsearch-exporter

Tip: You can use the default values.yaml

Upgrading an existing Release to a new major version

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

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.