Skip to content

Instantly share code, notes, and snippets.

@simonmulser
Created July 17, 2014 14:19
Show Gist options
  • Save simonmulser/c4bab9ff4d33e9ae4b50 to your computer and use it in GitHub Desktop.
Save simonmulser/c4bab9ff4d33e9ae4b50 to your computer and use it in GitHub Desktop.
Elasticsearch template for Logstash output
{
"template": "logstash-*",
"settings" : {
"number_of_shards" : 3,
"number_of_replicas" : 0,
"index" : {
"query" : { "default_field" : "message" },
"refresh_interval" : "30s",
"translog.flush_threshold_size" : "500mb",
"translog.interval" : "30s",
"memory.index_buffer_size" : "20%"
}
},
"mappings": {
"_default_": {
"_source": {
"excludes": ["type"]
},
"_all": { "enabled": false },
"dynamic_templates": [{
"string_template" : {
"match" : "*",
"mapping": { "type": "string", "index": "not_analyzed" },
"match_mapping_type" : "string"
}
}
],
"properties" : {
"message" : {"type" : "string", "index": "analyzed", "omit_norms": true},
"numeric_field_example_1" : {"type" : "integer"},
"numeric_field_examlple_2" : {"type" : "float"},
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment