Skip to content

Instantly share code, notes, and snippets.

@unicolet
Created September 11, 2014 14:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unicolet/b42ff8a8f57e6f938652 to your computer and use it in GitHub Desktop.
Save unicolet/b42ff8a8f57e6f938652 to your computer and use it in GitHub Desktop.
Elastisearch template for apache extended log format
{
"template":"logstash-*",
"settings":{
"index.refresh_interval":"5s"
},
"mappings":{
"_default_":{
"dynamic_templates":[
{
"string_fields":{
"match_mapping_type":"string",
"match":"*",
"mapping":{
"index":"analyzed",
"omit_norms":true,
"type":"string",
"fields":{
"raw":{
"index":"not_analyzed",
"ignore_above":256,
"type":"string"
}
}
}
}
}
],
"properties":{
"geoip":{
"dynamic":true,
"path":"full",
"properties":{
"location":{
"type":"geo_point"
}
},
"type":"object"
},
"@version":{
"index":"not_analyzed",
"type":"string"
},
"referer":{
"index":"not_analyzed",
"type":"string"
},
"request":{
"index":"not_analyzed",
"type":"string"
},
"responsetime":{
"type":"long"
},
"bytes":{
"type":"long"
}
},
"_all":{
"enabled":true
}
}
},
"aliases":{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment