kiwigrid / helm-charts

Helm charts for Kubernetes curated by Kiwigrid
https://kiwigrid.github.io
MIT License
184 stars 210 forks source link

[fluentd-elasticsearch] Make index_name changable #346

Closed snordmann closed 4 years ago

snordmann commented 4 years ago

What this PR does / why we need it:

A new feature to have a configurable index_name.

This should enable people using this chart to configure the index_name to their liking and requirements. Before the PR it was a choice between a large fluentd index or a daily <logstashPrefix>-%Y.%m.%d index.

Which issue this PR fixes

Special notes for your reviewer:

N/A

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

nlarzon commented 4 years ago

I was just having a similar problem. I was under the impression u could set the logstash prefix to expand the k8s namespace. logstash: enabled: true prefix: "${record['kubernetes']['namespace_name']}"

But I can't get it to work.. it results in the index ${record['kubernetes']['namespace_name']}-2020.05.19

rgarcia89 commented 4 years ago

@nlarzon @sbibow works for me

  logstash:
    enabled: true
    prefix: "${record['kubernetes']['namespace_name']}-ams1"
  outputType: "elasticsearch_dynamic"

Have you changed the output type to elasticsearch_dynamic?

nlarzon commented 4 years ago

No, I haven't will try that thanks!

monotek commented 4 years ago

Is this a breaking change for people updating from 9.0.0 to 9.1.0?

snordmann commented 4 years ago

@monotek Nope.

My variable elasticsearch.indexName has the same default value "fluentd" as the elasticsearch output plugin (see https://docs.fluentd.org/output/elasticsearch#index_name-optional)

monotek commented 4 years ago

thanks! :)