Skip to content

Commit ff3a144

Browse files
dougszumskimarkgoddard
authored andcommitted
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 (cherry picked from commit d3e87a2)
1 parent ef78aef commit ff3a144

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

ansible/roles/monasca/templates/monasca-log-persister/elasticsearch-template.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"fielddata": {
1414
"format": "disabled"
1515
},
16-
"index": "analyzed",
16+
"index": true,
1717
"omit_norms": true,
18-
"type": "string"
18+
"type": "text"
1919
},
2020
"match": "message",
2121
"match_mapping_type": "string"
@@ -24,8 +24,8 @@
2424
{
2525
"other_fields": {
2626
"mapping": {
27-
"index": "not_analyzed",
28-
"type": "string"
27+
"index": true,
28+
"type": "keyword"
2929
},
3030
"match": "*",
3131
"match_mapping_type": "string"
@@ -37,8 +37,8 @@
3737
"type": "date"
3838
},
3939
"@version": {
40-
"index": "not_analyzed",
41-
"type": "string"
40+
"index": true,
41+
"type": "keyword"
4242
},
4343
"creation_time": {
4444
"type": "date"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes `LP#1892376
5+
<https://bugs.launchpad.net/kolla-ansible/+bug/1892376>`__ by updating
6+
deprecated syntax in the Monasca Elasticsearch template.

0 commit comments

Comments
 (0)