mirror of
https://github.com/alerta/alerta.git
synced 2025-02-19 11:43:52 +00:00
42 lines
1.6 KiB
JSON
42 lines
1.6 KiB
JSON
![]() |
# curl -XPUT 'http://localhost:9200/_template/template_alerta/' -d @alerta-template.json
|
||
|
|
||
|
{
|
||
|
"template": "alerta-*",
|
||
|
"settings" : {
|
||
|
"index.number_of_shards" : 3,
|
||
|
"index.number_of_replicas" : 1,
|
||
|
"index.query.default_field" : "@message",
|
||
|
"index.routing.allocation.total_shards_per_node" : 2,
|
||
|
"index.auto_expand_replicas": false
|
||
|
},
|
||
|
"mappings": {
|
||
|
"_default_": {
|
||
|
"_all": { "enabled": false },
|
||
|
"_source": { "compress": false },
|
||
|
"dynamic_templates": [
|
||
|
{
|
||
|
"fields_template" : {
|
||
|
"mapping": { "type": "string", "index": "not_analyzed" },
|
||
|
"path_match": "@fields.*"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"tags_template" : {
|
||
|
"mapping": { "type": "string", "index": "not_analyzed" },
|
||
|
"path_match": "@tags.*"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"properties" : {
|
||
|
"@fields": { "type": "object", "dynamic": true, "path": "full" },
|
||
|
"@source" : { "type" : "string", "index" : "not_analyzed" },
|
||
|
"@source_host" : { "type" : "string", "index" : "not_analyzed" },
|
||
|
"@source_path" : { "type" : "string", "index" : "not_analyzed" },
|
||
|
"@timestamp" : { "type" : "date", "index" : "not_analyzed" },
|
||
|
"@type" : { "type" : "string", "index" : "not_analyzed" },
|
||
|
"@message" : { "type" : "string", "analyzer" : "whitespace" }
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|