From 69e34dcaf29f9b2ef42294611687eebefb5f253f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Dr=C3=A4bing?= <39558662+thomasdraebing@users.noreply.github.com> Date: Fri, 31 Aug 2018 20:04:41 +0200 Subject: [PATCH] Add option to set time key for elasticsearch (#7459) Signed-off-by: Thomas Draebing --- stable/fluent-bit/Chart.yaml | 2 +- stable/fluent-bit/README.md | 1 + stable/fluent-bit/templates/config.yaml | 3 +++ stable/fluent-bit/values.yaml | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stable/fluent-bit/Chart.yaml b/stable/fluent-bit/Chart.yaml index 6d9b4374a4..56d1fd68cf 100755 --- a/stable/fluent-bit/Chart.yaml +++ b/stable/fluent-bit/Chart.yaml @@ -1,5 +1,5 @@ name: fluent-bit -version: 0.9.0 +version: 0.10.0 appVersion: 0.13.0 description: Fast and Lightweight Log/Data Forwarder for Linux, BSD and OSX keywords: diff --git a/stable/fluent-bit/README.md b/stable/fluent-bit/README.md index 90aa382492..f21674c30e 100644 --- a/stable/fluent-bit/README.md +++ b/stable/fluent-bit/README.md @@ -39,6 +39,7 @@ The following table lists the configurable parameters of the Fluent-Bit chart an | `backend.es.port` | TCP port of the target Elasticsearch instance. | `9200` | | `backend.es.index` | Elastic Index name | `kubernetes_cluster` | | `backend.es.type` | Elastic Type name | `flb_type` | +| `backend.es.time_key` | Elastic Time Key | `@timestamp` | | `backend.es.logstash_prefix` | Index Prefix. If Logstash_Prefix is equals to 'mydata' your index will become 'mydata-YYYY.MM.DD'. | `kubernetes_cluster` | | `backend.es.http_user` | Optional username credential for Elastic X-Pack access. | `` | | `backend.es.http_passwd:` | Password for user defined in HTTP_User. | `` | diff --git a/stable/fluent-bit/templates/config.yaml b/stable/fluent-bit/templates/config.yaml index 38c9da0b60..4a76acf271 100644 --- a/stable/fluent-bit/templates/config.yaml +++ b/stable/fluent-bit/templates/config.yaml @@ -70,6 +70,9 @@ data: Logstash_Format On Retry_Limit False Type {{ .Values.backend.es.type }} +{{- if .Values.backend.es.time_key }} + Time_Key {{ .Values.backend.es.time_key }} +{{- end }} {{ else if eq .Values.backend.type "splunk" }} [OUTPUT] Name splunk diff --git a/stable/fluent-bit/values.yaml b/stable/fluent-bit/values.yaml index 0f35a56725..f2b19fba78 100644 --- a/stable/fluent-bit/values.yaml +++ b/stable/fluent-bit/values.yaml @@ -30,6 +30,7 @@ backend: index: kubernetes_cluster type: flb_type logstash_prefix: kubernetes_cluster + time_key: "@timestamp" # Optional username credential for Elastic X-Pack access http_user: # Password for user defined in HTTP_User