Kibana: Add support for arbitrary object definitions via

overrides

This allows for customizing the
indexes required by different deployment targets instead of
assuming all indexes are common for every type of deployment.

Change-Id: Iae9a35462400f7c8612ee7d0b49bfd6a20d3120c
This commit is contained in:
Radhika Pai 2020-05-18 09:14:56 -05:00
parent 99c09daa74
commit e966ae6ba8
2 changed files with 10 additions and 7 deletions

View File

@ -14,13 +14,14 @@ limitations under the License.
*/}}
set -ex
{{- range .Values.conf.create_kibana_indexes.indexes }}
{{- range $objectType, $indices := .Values.conf.create_kibana_indexes.indexes }}
{{- range $indices }}
curl -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \
-XPOST "${KIBANA_ENDPOINT}/api/saved_objects/index-pattern/{{ . }}*" -H 'kbn-xsrf: true' \
-H 'Content-Type: application/json' -d \
'{"attributes":{"title":"{{ . }}-*","timeFieldName":"@timestamp"}}'
{{ end }}
{{- end }}
{{- end }}
curl -K- <<< "--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}" \
-XPOST "${KIBANA_ENDPOINT}/api/kibana/settings/defaultIndex" -H 'kbn-xsrf: true' \

View File

@ -280,10 +280,12 @@ conf:
enabled: true
version: 7.1.0
indexes:
base:
- logstash
- openstack
- journal
- kernel
application:
- openstack
default_index: logstash
endpoints: