fluent-bit

by joaquinito2051

Helm chartv2.10.1App 1.3.7

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 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 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.retry_limitMax number of retries to attempt (False == no limit)False
backend.es.time_keyElastic Time Key@timestamp
backend.es.logstash_formatEnable Logstash format compatibility.On
backend.es.logstash_prefixIndex Prefix. If Logstash_Prefix is equal to 'mydata' your index will become 'mydata-YYYY.MM.DD'.kubernetes_cluster
backend.es.logstash_prefix_keyIndex Prefix key. When included, the value in the record that belongs to the key will be looked up and overwrite Logstash_Prefix for index generation. If Logstash_Prefix_Key = 'mydata' the index becomes 'mydata-YYYY.MM.DD'.``
backend.es.logstash_dateformatTime format (based on strftime) to generate the second part of the Index name. Fluent-bit by default use %Y.%m.%d``
backend.es.replace_dotsEnable/Disable Replace_Dots option.On
backend.es.http_userOptional username credential for Elastic X-Pack access.``
backend.es.http_passwdPassword for user defined in HTTP_User.``
backend.es.http_passwd_secretSecret name for password for user defined in HTTP_User.``
backend.es.http_passwd_secret_keySecret key for password for user defined in HTTP_User.``
backend.es.tlsEnable or disable TLS supportoff
backend.es.tls_verifyForce certificate validationon
backend.es.tls_secretExisting secret storing TLS CA certificate for the Elastic instance. Specify if tls: on. Overrides backend.es.tls_ca``
backend.es.tls_secret_ca_keyExisting secret key storing TLS CA certificate for the Elastic instance. Specify if tls: on.``
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.json_date_formatSpecify the format of the date. Supported formats are double and iso8601double
backend.http.headersHTTP Headers[]
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
Stackdriver Backend
backend.stackdriver.google_service_credentialsContents of a Google Cloud credentials JSON file.``
backend.stackdriver.service_account_emailAccount email associated to the service. Only available if no credentials file has been provided.``
backend.stackdriver.service_account_secretPrivate key content associated with the service account. Only available if no credentials file has been provided.``
Parsers
parsers.enabledEnable custom parsersfalse
parsers.regexList of regex parsersNULL
parsers.jsonList of json parsersNULL
parsers.logfmtList of logfmt parsersNULL
General
annotationsOptional deamonset set annotationsNULL
audit.enableEnable collection of audit logsfalse
audit.input.memBufLimitSpecify Mem_Buf_Limit in tail input35mb
audit.input.parserSpecify Parser in tail inputdocker
audit.input.tagSpecify Tag in tail inputaudit.*
audit.input.pathSpecify log file(s) through the use of common wildcards/var/log/kube-apiserver-audit.log
audit.input.bufferChunkSizeSpecify Buffer_Chunk_Size in tail2MB
audit.input.bufferMaxSizeSpecify Buffer_Max_Size in tail10MB
audit.input.skipLongLinesSpecify Skip_Long_Lines in tailOn
audit.input.keySpecify Key in tailkubernetes-audit
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``
extraEntries.serviceExtra entries for existing [SERVICE] section``
extraPortsList of extra ports
extraVolumeMountsMount an extra volume, required to mount ssl certificates when elasticsearch has tls enabled
extraVolumeExtra volume
initContainersInit containers{}
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
filter.mergeLogKeyIf set, append the processed log keys under a new root key specified by this variable.nil
filter.useJournalIf true, the filter reads logs coming in Journald format.false
image.fluent_bit.repositoryImagefluent/fluent-bit
image.fluent_bit.tagImage tag1.3.7
image.pullPolicyImage pull policyAlways
image.pullSecretsImage pull secretsnil
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.tail.ignore_olderIgnores files that have been last modified before this time in seconds. Supports m,h,d (minutes, hours,days) syntax.``
input.tail.dockerModeRecombine split Docker log lines before passing them to the parser.false
input.tail.dockerModeFlushWait period time in seconds to flush queued unfinished split lines in docker mode.4
input.tail.exclude_pathExclude paths from tail input (Exclude_Path configuration parameter).``
input.systemd.enabledEnable systemd inputfalse
`input.systemd.filters

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.10.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