From d3e87a2e4d8b2ca6f03d0c19f3f3d619b52d5514 Mon Sep 17 00:00:00 2001 From: Doug Szumski Date: Thu, 20 Aug 2020 14:42:10 +0000 Subject: [PATCH] Update String type for Monasca ES template This updates the Elasticsearch template used by Monasca to persist logs so that is uses the 'new' string types [1]. As an aside it helps to make the template more clear; full text search for log messages, and keyword searches for everything else. [1] https://www.elastic.co/blog/strings-are-dead-long-live-strings Closes-Bug: #1892376 Change-Id: I0cd6bf22d4695d88d93241da4364d170d8d8c80e --- .../elasticsearch-template.json | 12 ++++++------ ...asca-elasticsearch-template-41492c59acaf92b1.yaml | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/update-monasca-elasticsearch-template-41492c59acaf92b1.yaml diff --git a/ansible/roles/monasca/templates/monasca-log-persister/elasticsearch-template.json b/ansible/roles/monasca/templates/monasca-log-persister/elasticsearch-template.json index c882454cb7..15ea285d30 100644 --- a/ansible/roles/monasca/templates/monasca-log-persister/elasticsearch-template.json +++ b/ansible/roles/monasca/templates/monasca-log-persister/elasticsearch-template.json @@ -13,9 +13,9 @@ "fielddata": { "format": "disabled" }, - "index": "analyzed", + "index": true, "omit_norms": true, - "type": "string" + "type": "text" }, "match": "message", "match_mapping_type": "string" @@ -24,8 +24,8 @@ { "other_fields": { "mapping": { - "index": "not_analyzed", - "type": "string" + "index": true, + "type": "keyword" }, "match": "*", "match_mapping_type": "string" @@ -37,8 +37,8 @@ "type": "date" }, "@version": { - "index": "not_analyzed", - "type": "string" + "index": true, + "type": "keyword" }, "creation_time": { "type": "date" diff --git a/releasenotes/notes/update-monasca-elasticsearch-template-41492c59acaf92b1.yaml b/releasenotes/notes/update-monasca-elasticsearch-template-41492c59acaf92b1.yaml new file mode 100644 index 0000000000..bad5b59fae --- /dev/null +++ b/releasenotes/notes/update-monasca-elasticsearch-template-41492c59acaf92b1.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes `LP#1892376 + `__ by updating + deprecated syntax in the Monasca Elasticsearch template.