Skip to content

Instantly share code, notes, and snippets.

@crazed
Created June 13, 2013 18:45
Show Gist options
  • Select an option

  • Save crazed/5776270 to your computer and use it in GitHub Desktop.

Select an option

Save crazed/5776270 to your computer and use it in GitHub Desktop.
logstash elasticsearch template
{
"template_logstash" : {
"order" : 0,
"template" : "logstash-*",
"settings" : {
"index.query.default_field" : "@message",
"index.number_of_replicas" : "1",
"index.number_of_shards" : "3",
"index.routing.allocation.total_shards_per_node" : "2",
"index.auto_expand_replicas" : "false"
},
"mappings" : {
"_default_" : {
"_source" : {
"compress" : false
},
"dynamic_templates" : [ {
"fields_template" : {
"mapping" : {
"index" : "not_analyzed",
"type" : "string"
},
"path_match" : "@fields.*"
}
}, {
"tags_template" : {
"mapping" : {
"index" : "not_analyzed",
"type" : "string"
},
"path_match" : "@tags.*"
}
} ],
"properties" : {
"@fields" : {
"dynamic" : true,
"path" : "full",
"properties" : {
"response_time" : {
"index" : "not_analyzed",
"type" : "float"
}
},
"type" : "object"
},
"@timestamp" : {
"index" : "not_analyzed",
"type" : "date"
},
"@message" : {
"analyzer" : "whitespace",
"type" : "string"
},
"@source" : {
"index" : "not_analyzed",
"type" : "string"
},
"@type" : {
"index" : "not_analyzed",
"type" : "string"
},
"@source_host" : {
"index" : "not_analyzed",
"type" : "string"
},
"@source_path" : {
"index" : "not_analyzed",
"type" : "string"
}
},
"_all" : {
"enabled" : false
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment