elastalert

by joaquinito2051

Helm chartv1.0.0App 0.1.39

ElastAlert is a simple framework for alerting on anomalies, spikes, or other patterns of interest from data in Elasticsearch.

About this chart

Elastalert Helm Chart

elastalert is a simple framework for alerting on anomalies, spikes, or other patterns of interest from data in Elasticsearch.

TL;DR;

For ES 5.x:

$ helm install <helm-repo>/elastalert

$ helm install stable/elastalert For ES 6.x:

$ helm install <helm-repo>/elastalert --set writebackIndex=elastalert

# Open Dev Tools on Kibana and send the below.
$ helm install stable/elastalert --set writebackIndex=elastalert
# Otherwise elastalert ends up with errors like "RequestError: TransportError(400, u'search_phase_execution_exception', u'No mapping found for [alert_time] in order to sort on')"
PUT /elastalert/_mapping/elastalert
{
  "properties": {
      "alert_time": {"type": "date"}
  }
}

See the comment in the default values.yaml to know why writebackIndex is required for ES 6.x.

Installing the Chart

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

$ helm install --name my-release <helm-repo>/elastalert

$ helm install --name my-release stable/elastalert The command deploys elastalert on the Kubernetes cluster in 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:

$ helm delete my-release

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

Configuration

ParameterDescriptionDefault
image.repositorydocker imagejertel/elastalert-docker
image.tagdocker image tag0.1.39
image.pullPolicyimage pull policyIfNotPresent
commandcommand override for containerNULL
argsargs override for containerNULL
replicaCountnumber of replicas to run1
elasticsearch.hostelasticsearch endpoint to useelasticsearch
elasticsearch.portelasticsearch port to use80
elasticsearch.useSslwhether or not to connect to es_host using SSLFalse
elasticsearch.usernameUsername for ES with basic authNULL
elasticsearch.passwordPassword for ES with basic authNULL
elasticsearch.verifyCertswhether or not to verify TLS certificatesTrue
elasticsearch.clientCertpath to a PEM certificate to use as the client certificate/certs/client.pem
elasticsearch.clientKeypath to a private key file to use as the client key/certs/client-key.pem
elasticsearch.caCertspath to a CA cert bundle to use to verify SSL connections/certs/ca.pem
elasticsearch.certsVolumescerts volumes, required to mount ssl certificates when elasticsearch has tls enabledNULL
elasticsearch.certsVolumeMountsmount certs volumes, required to mount ssl certificates when elasticsearch has tls enabledNULL
extraConfigOptionsAdditional options to propagate to all rules, cannot be alert, type, name or index{}
resourcesContainer resource requests and limits{}
rulesRule and alert configuration for Elastalert{} example shown in values.yaml
runIntervalMinsDefault interval between alert checks, in minutes1
realertIntervalMinsTime between alarms for same rule, in minutesNULL
alertRetryLimitMinsTime to retry failed alert deliveries, in minutes2880 (2 days)
bufferTimeMinsDefault rule buffer time, in minutes15
writebackIndexName or prefix of elastalert index(es)elastalert_status
nodeSelectorNode selector for deployment{}
tolerationsTolerations for deployment[]

Deploy elastalert with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has elastalert 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 chartelastalert is pinned at v1.0.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