d3e87a2e4d
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
57 lines
1.1 KiB
JSON
57 lines
1.1 KiB
JSON
{
|
|
"aliases": {},
|
|
"mappings": {
|
|
"log": {
|
|
"_all": {
|
|
"enabled": true,
|
|
"omit_norms": true
|
|
},
|
|
"dynamic_templates": [
|
|
{
|
|
"message_field": {
|
|
"mapping": {
|
|
"fielddata": {
|
|
"format": "disabled"
|
|
},
|
|
"index": true,
|
|
"omit_norms": true,
|
|
"type": "text"
|
|
},
|
|
"match": "message",
|
|
"match_mapping_type": "string"
|
|
}
|
|
},
|
|
{
|
|
"other_fields": {
|
|
"mapping": {
|
|
"index": true,
|
|
"type": "keyword"
|
|
},
|
|
"match": "*",
|
|
"match_mapping_type": "string"
|
|
}
|
|
}
|
|
],
|
|
"properties": {
|
|
"@timestamp": {
|
|
"type": "date"
|
|
},
|
|
"@version": {
|
|
"index": true,
|
|
"type": "keyword"
|
|
},
|
|
"creation_time": {
|
|
"type": "date"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"order": 0,
|
|
"settings": {
|
|
"index": {
|
|
"refresh_interval": "5s"
|
|
}
|
|
},
|
|
"template": "monasca-*"
|
|
}
|