Skip to content

Instantly share code, notes, and snippets.

@evilabandon
Created February 28, 2014 08:38
Show Gist options
  • Save evilabandon/9267478 to your computer and use it in GitHub Desktop.
Save evilabandon/9267478 to your computer and use it in GitHub Desktop.
curl -XPUT localhost:9200/_template/logstash -d @logstashtemplate.json
{
"template" : "logstash*",
"mappings" : {
"tengine" : {
"_source" : {
"compress" : true
},
"_all" : {
"enabled" : false
},
"properties" : {
"@timestamp" : {
"type" : "date",
"format" : "dateOptionalTime"
},
"bsize" : {
"type" : "long",
"index" : "not_analyzed"
},
"city" : {
"type" : "string",
"index" : "not_analyzed"
},
"code" : {
"type" : "string",
"index" : "not_analyzed"
},
"referer" : {
"type" : "string"
},
"remote" : {
"type" : "string",
"index" : "not_analyzed"
},
"request_uri" : {
"type" : "string"
},
"rtime" : {
"type" : "double"
},
"source_host" : {
"type" : "string"
},
"upstream" : {
"type" : "string",
"index" : "not_analyzed"
},
"upstreamcode" : {
"type" : "string",
"index" : "not_analyzed"
},
"upstreamrtime" : {
"type" : "string",
"index" : "not_analyzed"
},
"useragent" : {
"type" : "string"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment