Back to Charts

⚠️ Repo Archive Notice

stable/logstash/README.md

latest11.4 KB
Original Source

⚠️ Repo Archive Notice

As of Nov 13, 2020, charts in this repo will no longer be updated. For more information, see the Helm Charts Deprecation and Archive Notice, and Update.

Logstash

Logstash is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your favorite “stash.”

DEPRECATION NOTICE

This chart is deprecated and no longer supported.

TL;DR;

console
$ helm install stable/logstash

Installing the Chart

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

console
$ helm install --name my-release stable/logstash

Uninstalling the Chart

To uninstall/delete the my-release deployment:

console
$ helm delete my-release

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

Best Practices

Release and tune this chart once per Logstash pipeline

To achieve multiple pipelines with this chart, current best practice is to maintain one pipeline per chart release. In this way configuration is simplified and pipelines are more isolated from one another.

Default Pipeline: Beats Input -> Elasticsearch Output

Current best practice for ELK logging is to ship logs from hosts using Filebeat to logstash where persistent queues are enabled. Filebeat supports structured (e.g. JSON) and unstructured (e.g. log lines) log shipment.

Load Beats-generated index template into Elasticsearch

To best utilize the combination of Beats, Logstash and Elasticsearch, load Beats-generated index templates into Elasticsearch as described here.

On a remote-to-Kubernetes Linux instance you might run the following command to load that instance's Beats-generated index template into Elasticsearch (Elasticsearch hostname will vary).

filebeat setup --template -E output.logstash.enabled=false \
  -E 'output.elasticsearch.hosts=["elasticsearch.cluster.local:9200"]'

Please review the following links that expound on current best practices.

Configuration

The following table lists the configurable parameters of the chart and its default values.

ParameterDescriptionDefault
replicaCountNumber of replicas1
podDisruptionBudgetPod disruption budgetmaxUnavailable: 1
updateStrategyUpdate strategytype: RollingUpdate
image.repositoryContainer image namedocker.elastic.co/logstash/logstash-oss
image.tagContainer image tag7.1.1
image.pullPolicyContainer image pull policyIfNotPresent
service.typeService type (ClusterIP, NodePort or LoadBalancer)ClusterIP
service.annotationsService annotations{}
service.portsPorts exposed by servicebeats
service.loadBalancerIPThe load balancer IP for the serviceunset
service.loadBalancerSourceRangesCIDR ranges to allow access to load balancerunset
service.clusterIPThe cluster IP for the serviceunset
service.nodePortThe nodePort for the serviceunset
service.externalTrafficPolicySet externalTrafficPolicyunset
portsPorts exposed by logstash containerbeats
ingress.enabledEnables Ingressfalse
ingress.annotationsIngress annotations{}
ingress.pathIngress path/
ingress.hostsIngress accepted hostnames["logstash.cluster.local"]
ingress.tlsIngress TLS configuration[]
logstashJavaOptsJava options for logstash like heap size"-Xmx1g -Xms1g"
resourcesPod resource requests & limits{}
priorityClassNamepriorityClassNamenil
nodeSelectorNode selector{}
tolerationsTolerations[]
affinityAffinity or Anti-Affinity{}
podAnnotationsPod annotations{}
podLabelsPod labels{}
extraEnvExtra pod environment variables[]
envFromEnvironment variables from configMaps & secrets[]
extraContainersAdd additional containers[]
extraInitContainersAdd additional initContainers[]
podManagementPolicypodManagementPolicy of the StatefulSetOrderedReady
livenessProbeLiveness probe settings for logstash container(see values.yaml)
readinessProbeReadiness probe settings for logstash container(see values.yaml)
persistence.enabledEnable persistencetrue
persistence.storageClassStorage class for PVCsunset
persistence.accessModeAccess mode for PVCsReadWriteOnce
persistence.sizeSize for PVCs2Gi
volumeMountsVolume mounts to configure for logstash container(see values.yaml)
volumesVolumes to configure for logstash container[]
terminationGracePeriodSecondsDuration the pod needs to terminate gracefully30
exporter.logstashPrometheus logstash-exporter settings(see values.yaml)
exporter.logstash.enabledEnables Prometheus logstash-exporterfalse
exporter.serviceMonitor.enabledIf true, a ServiceMonitor CRD is created for a prometheus operatorfalse
exporter.serviceMonitor.namespaceIf set, the ServiceMonitor will be installed in a different namespace""
exporter.serviceMonitor.labelsLabels for prometheus operator{}
exporter.serviceMonitor.intervalInterval at which metrics should be scraped10s
exporter.serviceMonitor.scrapeTimeoutTimeout after which the scrape is ended10s
exporter.serviceMonitor.schemeScheme to use for scrapinghttp
elasticsearch.hostElasticSearch hostname (passed through tpl)elasticsearch-client.default.svc.cluster.local
elasticsearch.portElasticSearch port9200
configLogstash configuration key-values(see values.yaml)
patternsLogstash patterns configurationnil
filesLogstash custom files configurationnil
binaryFilesLogstash custom binary filesnil
inputsLogstash inputs configurationbeats
filtersLogstash filters configurationnil
outputsLogstash outputs configurationelasticsearch
securityContext.fsGroupGroup ID for the container1000
securityContext.runAsUserUser ID for the container1000
argsAdditional arguments to pass to Logstash1000
serviceAccount.createSpecifies if a ServiceAccount should be createdtrue
serviceAccount.nameThe name of the ServiceAccount to use""