Skip to content

Instantly share code, notes, and snippets.

@WPsites
Last active September 17, 2017 17:26
Show Gist options
  • Save WPsites/4685598 to your computer and use it in GitHub Desktop.
Save WPsites/4685598 to your computer and use it in GitHub Desktop.
Elasticsearch index template for logstash that contains additional NGINX fields
{
"template" : "logstash*",
"settings" : {
"number_of_shards" : 5,
"index.cache.field.type" : "soft",
"index.refresh_interval" : "5s",
"index.store.compress.stored" : true,
"index.query.default_field" : "@message",
"index.routing.allocation.total_shards_per_node" : 5
},
"mappings" : {
"_default_" : {
"_all" : {"enabled" : false},
"properties" : {
"@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