Skip to content

Instantly share code, notes, and snippets.

@cdahlqvist
Created August 2, 2016 15:01
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 cdahlqvist/15fd980be2a8665dc1026a6811df60fb to your computer and use it in GitHub Desktop.
Save cdahlqvist/15fd980be2a8665dc1026a6811df60fb to your computer and use it in GitHub Desktop.
sample_event_and_mapping
{
"@timestamp": "2016-01-29T16:18:30.574Z",
"referrer": "https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html",
"verb": "GET",
"request": "/assets/blt6892ef667f7c28d7/icon-elasticsearch2.svg",
"geoip": {
"location": [87.3333, 22.3333],
"country_name": "India"
},
"agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36",
"bytes": 1421,
"clientip": "203.110.248.239",
"useragent": {
"os": "Mac OS X 10.11.4",
"os_name": "Mac OS X",
"name": "Chrome"
},
"response": 200,
"httpversion": "1.1"
}
{
"template": "elasticlogs_shardsizing",
"settings": {
"index.refresh_interval": "5s",
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"_default_": {
"dynamic_templates": [{
"string_fields": {
"mapping": {
"type": "keyword"
},
"match_mapping_type": "string",
"match": "*"
}
}],
"properties": {
"@timestamp": { "type": "date" },
"@version": { "type": "keyword" },
"message": { "type": "text", "index": false },
"geoip" : {
"dynamic": true,
"properties" : {
"location" : { "type" : "geo_point" }
}
},
"request": {
"norms": false,
"type": "text",
"fields": {
"raw": {
"ignore_above": 256,
"type": "keyword"
}
}
},
"referrer": {
"norms": false,
"type": "text",
"fields": {
"raw": {
"ignore_above": 256,
"type": "keyword"
}
}
}
},
"_all": {
"enabled": false
}
}
},
"aliases": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment