Skip to content

Instantly share code, notes, and snippets.

@avleen
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avleen/11269726 to your computer and use it in GitHub Desktop.
Save avleen/11269726 to your computer and use it in GitHub Desktop.
{
"template": "logstash-*",
"settings" : {
"number_of_shards" : 24,
"number_of_replicas" : 1,
"index.refresh_interval" : "5s",
"index.routing.allocation.total_shards_per_node" : 1,
"index.search.slowlog.threshold.query.warn": "10s",
"index.query.default_field" : "message",
"analysis" : {
"char_filter" : {
"word_joiners" : {
"type": "mapping",
"mappings": [ ":=>\\u0020" ]
}
},
"filter" : {
"short_long_words" : {
"min" : 4,
"max" : 48,
"type" : "length"
}
},
"analyzer" : {
"logstashstd" : {
"type" : "custom",
"tokenizer" : "standard",
"char_filter": [ "word_joiners" ],
"filter" : [ "standard", "short_long_words", "stop", "lowercase", "unique" ]
},
"logstash" : {
"type" : "custom",
"tokenizer" : "whitespace",
"char_filter": [ "word_joiners" ],
"filter" : [ "short_long_words", "stop", "lowercase", "unique" ]
}
}
}
},
"mappings": {
"_default_": {
"_all": { "enabled": false },
"_id": { "path": "@uuid" },
"dynamic_templates": [
{
"string_template" : {
"match" : "*",
"mapping": { "type": "string", "index": "not_analyzed" },
"match_mapping_type" : "string"
}
}
],
"properties" : {
"message" : { "type" : "string", "index" : "analyzed", "omit_norms": true, "analyzer": "logstashstd" },
"file" : { "type" : "string", "index" : "no" },
"tags": { "type": "string", "index" : "not_analyzed" },
"@timestamp" : { "type" : "date", "index" : "not_analyzed" },
"index_timestamp" : { "type" : "date", "index" : "not_analyzed", "format" : "YYYY-MM-dd HH:mm:ss Z" },
"ident" : { "type" : "string", "index" : "no" },
"auth" : { "type" : "string", "index" : "no" },
"X_Forwarded_For" : { "type": "ip", "index" : "not_analyzed" },
"response_bytes" : { "type": "integer", "index" : "not_analyzed" },
"http_version" : { "type": "float", "index" : "not_analyzed" },
"response" : { "type": "short", "index" : "analyzed" },
"php_memory_usage_bytes" : { "type": "integer", "index" : "not_analyzed" },
"php_time_microsec" : { "type": "long", "index" : "not_analyzed" },
"php_utime_microsec" : { "type": "long", "index" : "not_analyzed" },
"php_stime_microsec" : { "type": "long", "index" : "not_analyzed" },
"apache_time_microsec" : { "type": "long", "index" : "not_analyzed" },
"request_uri" : { "type" : "string", "index": "not_analyzed" },
"user_agent" : { "type" : "multi_field",
"fields" : {
"user_agent" : { "type" : "string", "index": "analyzed", "analyzer" : "logstash" },
"raw" : { "type" : "string", "index": "not_analyzed" }
}
},
"referrer" : { "type" : "multi_field",
"fields" : {
"referrer" : { "type" : "string", "index": "analyzed", "analyzer" : "logstash" },
"raw" : { "type" : "string", "index": "not_analyzed" }
}
},
"request_params" : { "type" : "object", "dynamic" : true, "path": "full" },
"geoip" : { "type" : "object", "dynamic": true, "path": "full",
"properties" : {
"location" : { "type": "geo_point" }
}
},
"logdata" : { "type" : "object", "dynamic" : true, "path": "full",
"properties" : {
"bytes_sent" : { "type": "long", "index": "not_analyzed" },
"source_bytes" : { "type": "long", "index": "not_analyzed" },
"source_chars" : { "type": "long", "index": "not_analyzed" },
"result_bytes" : { "type": "long", "index": "not_analyzed" },
"result_chars" : { "type": "long", "index": "not_analyzed" }
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment