fluent-bit

by joaquinito2051

Helm chartv2.0.1App 1.1.0

Fast and Lightweight Log/Data Forwarder for Linux, BSD and OSX

About this chart

Fluent-Bit Chart

Fluent Bit is an open source and multi-platform Log Forwarder.

Chart Details

This chart will do the following:

  • Install a configmap for Fluent Bit
  • Install a daemonset that provisions Fluent Bit [per-host architecture]

Installing the Chart

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

$ helm install --name my-release <helm-repo>/fluent-bit

$ helm install --name my-release stable/fluent-bit When installing this chart on Minikube, it's required to specify that so the DaemonSet will be able to mount the log files properly, make sure to append the --set on_minikube=true option at the end of the helm command, e.g:

$ helm install --name my-release <helm-repo>/fluent-bit --set on_minikube=true

$ helm install --name my-release stable/fluent-bit --set on_minikube=true

Configuration

The following table lists the configurable parameters of the Fluent-Bit chart and the default values.

ParameterDescriptionDefault
Backend Selection
backend.typeSet the backend to which Fluent-Bit should flush the information it gathersforward
Forward Backend
backend.forward.hostTarget host where Fluent-Bit or Fluentd are listening for Forward messagesfluentd
backend.forward.portTCP Port of the target service24284
backend.forward.shared_keyA key string known by the remote Fluentd used for authorization.``
backend.forward.tlsEnable or disable TLS supportoff
backend.forward.tls_verifyForce certificate validationon
backend.forward.tls_debugSet TLS debug verbosity level. It accept the following values: 0-41
ElasticSearch Backend
backend.es.hostIP address or hostname of the target Elasticsearch instanceelasticsearch
backend.es.portTCP port of the target Elasticsearch instance.9200
backend.es.indexElastic Index namekubernetes_cluster
backend.es.typeElastic Type nameflb_type
backend.es.time_keyElastic Time Key@timestamp
backend.es.logstash_prefixIndex Prefix. If Logstash_Prefix is equals to 'mydata' your index will become 'mydata-YYYY.MM.DD'.kubernetes_cluster
backend.es.replace_dotsEnable/Disable Replace_Dots option.On
backend.es.http_userOptional username credential for Elastic X-Pack access.``
backend.es.http_passwd:Password for user defined in HTTP_User.``
backend.es.tlsEnable or disable TLS supportoff
backend.es.tls_verifyForce certificate validationon
backend.es.tls_caTLS CA certificate for the Elastic instance (in PEM format). Specify if tls: on.``
backend.es.tls_debugSet TLS debug verbosity level. It accept the following values: 0-41
HTTP Backend
backend.http.hostIP address or hostname of the target HTTP Server127.0.0.1
backend.http.portTCP port of the target HTTP Server80
backend.http.uriSpecify an optional HTTP URI for the target web server, e.g: /something"/"
backend.http.http_userOptional username credential for Basic Authentication.``
backend.http.http_passwd:Password for user defined in HTTP_User.``
backend.http.formatSpecify the data format to be used in the HTTP request body, by default it uses msgpack, optionally it can be set to json.msgpack
backend.http.tlsEnable or disable TLS supportoff
backend.http.tls_verifyForce certificate validationon
backend.http.tls_debugSet TLS debug verbosity level. It accept the following values: 0-41
Splunk Backend
backend.splunk.hostIP address or hostname of the target Splunk Server127.0.0.1
backend.splunk.portTCP port of the target Splunk Server8088
backend.splunk.tokenSpecify the Authentication Token for the HTTP Event Collector interface.``
backend.splunk.send_rawIf enabled, record keys and values are set in the main map.off
backend.splunk.tlsEnable or disable TLS supporton
backend.splunk.tls_verifyForce TLS certificate validationoff
backend.splunk.tls_debugSet TLS debug verbosity level. It accept the following values: 0-41
backend.splunk.message_keyTag applied to all incoming logskubernetes
Parsers
parsers.enabledEnable custom parsersfalse
parsers.regexList of regex parsersNULL
parsers.jsonList of json parsersNULL
General
annotationsOptional deamonset set annotationsNULL
podAnnotationsOptional pod annotationsNULL
podLabelsOptional pod labelsNULL
fullConfigMapUser has provided entire config (parsers + system)false
existingConfigMapConfigMap override``
extraEntries.inputExtra entries for existing [INPUT] section``
extraEntries.filterExtra entries for existing [FILTER] section``
extraEntries.outputExtra entries for existing [OUPUT] section``
extraPortsList of extra ports
extraVolumeMountsMount an extra volume, required to mount ssl certificates when elasticsearch has tls enabled
extraVolumeExtra volume
service.flushInterval to flush output (seconds)1
service.logLevelDiagnostic level (error/warning/info/debug/trace)info
filter.enableExcludeEnable the use of monitoring for a pod annotation of fluentbit.io/exclude: true. If present, discard logs from that pod.true
filter.enableParserEnable the use of monitoring for a pod annotation of fluentbit.io/parser: parser_name. parser_name must be the name of a parser contained within parsers.conftrue
filter.kubeURLOptional custom configmapshttps://kubernetes.default.svc:443
filter.kubeCAFileOptional custom configmaps/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
filter.kubeTokenFileOptional custom configmaps/var/run/secrets/kubernetes.io/serviceaccount/token
filter.kubeTagOptional top-level tag for matching in filterkube
filter.kubeTagPrefixOptional tag prefix used by Tailkube.var.log.containers.
filter.mergeJSONLogIf the log field content is a JSON string map, append the map fields as part of the log structuretrue
image.fluent_bit.repositoryImagefluent/fluent-bit
image.fluent_bit.tagImage tag1.0.6
image.pullPolicyImage pull policyIfNotPresent
nameOverrideOverride name of appnil
fullnameOverrideOverride full name of appnil
image.pullSecretsSpecify image pull secretsnil
input.tail.memBufLimitSpecify Mem_Buf_Limit in tail input5MB
input.tail.parserSpecify Parser in tail input.docker
input.tail.pathSpecify log file(s) through the use of common wildcards./var/log/containers/*.log
input.systemd.enabledEnable systemd inputfalse
input.systemd.filters.systemdUnitPlease see https://docs.fluentbit.io/manual/input/systemd[docker.service, kubelet.service, node-problem-detector.service]
input.systemd.maxEntriesPlease see https://docs.fluentbit.io/manual/input/systemd1000
input.systemd.readFromTailPlease see https://docs.fluentbit.io/manual/input/systemdtrue
input.systemd.tagPlease see https://docs.fluentbit.io/manual/input/systemdhost.*
rbac.createSpecifies whether RBAC resources should be created.true
serviceAccount.createSpecifies whether a ServiceAccount should be created.true
serviceAccount.nameThe name of the ServiceAccount to use.NULL
rawConfigRaw contents of fluent-bit.conf@INCLUDE fluent-bit-service.conf@INCLUDE fluent-bit-input.conf@INCLUDE fluent-bit-filter.conf @INCLUDE fluent-bit-output.conf
resourcesPod resource requests & limits{}
hostNetworkUse host's networkfalse
dnsPolicySpecifies the dnsPolicy to useClusterFirst
priorityClassNameSpecifies the priorityClassName to useNULL
tolerationsOptional daemonset tolerationsNULL
nodeSelectorNode labels for fluent-bit pod assignmentNULL
affinityExpressions for affinityNULL
metrics.enabledSpecifies whether a service for metrics should be exposedfalse
metrics.service.annotationsOptional metrics service annotationsNULL
metrics.service.portPort on where metrics should be exposed2020
metrics.service.typeService type for metricsClusterIP
trackOffsetsSpecify whether to track the file offsets for tailing docker logs. This allows fluent-bit to pick up where it left after pod restarts but requires access to a hostPathfalse
testFramework.imagetest-framework image repository.dduportal/bats
testFramework.tagtest-framework image tag.0.4.0

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

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, Specify each parameter using the --set key=value[,key=value] argument to helm install.

$ helm install --name my-release -f values.yaml <helm-repo>/fluent-bit

$ helm install --name my-release -f values.yaml stable/fluent-bit

Tip: You can use the default values.yaml

Upgrading

From < 1.0.0 To >= 1.0.0

Values extraInputs, extraFilters and extraOutputs have been removed in version 1.0.0 of the fluent-bit chart. To add additional entries to the existing sections, please use the extraEntries.input, extraEntries.filter and extraEntries.output values. For entire sections, please use the rawConfig value, inserting blocks of text as desired.

From < 1.8.0 to >= 1.8.0

Version 1.8.0 introduces the use of release name as full name if it contains the chart name(fluent-bit in this case). E.g. with a release name of `f

Deploy fluent-bit with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has fluent-bit 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 chartfluent-bit is pinned at v2.0.1 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