Skip to content

Instantly share code, notes, and snippets.

@fetep
Created November 10, 2012 18:41
Show Gist options
  • Save fetep/4052065 to your computer and use it in GitHub Desktop.
Save fetep/4052065 to your computer and use it in GitHub Desktop.
logstash-index.json
{
"template": "logstash-*",
"order" : 0,
"settings" : {
"number_of_shards" : 6,
"number_of_replicas" : 1,
"index" : {
"routing" : { "allocation" : { "total_shards_per_node" : "2" } },
"query" : { "default_field" : "@message" },
"store" : { "compress" : { "stored" : true, "tv" : true, "throttle" : { "type" : "merge", "max_bytes_per_sec" : "5mb" } } },
"term_index_devisor" : "1",
"term_index_interval" : "128",
"refresh_interval" : "5s",
"merge" : { "policy" : { "max_merged_segment" : "2g" } },
"cache" : { "field.type" : "soft" }
}
},
"mappings": {
"_default_": {
"_all": { "enabled": false },
"_source": { "compress": true },
"dynamic_templates": [
{
"string_template" : {
"match" : "*",
"mapping": { "type": "string", "index": "not_analyzed" },
"match_mapping_type" : "string"
}
}
],
"properties" : {
"@fields": { "type": "object", "dynamic": true, "path": "full" },
"@message" : { "type" : "string", "index" : "analyzed" },
"@source" : { "type" : "string", "index" : "not_analyzed" },
"@source_host" : { "type" : "string", "index" : "not_analyzed" },
"@source_path" : { "type" : "string", "index" : "not_analyzed" },
"@tags": { "type": "string", "index" : "not_analyzed" },
"@timestamp" : { "type" : "date", "index" : "not_analyzed" },
"@type" : { "type" : "string", "index" : "not_analyzed" }
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment