Skip to content

Instantly share code, notes, and snippets.

@gerardjp
Last active May 13, 2019 15:32
Show Gist options
  • Save gerardjp/644836eece0099ef2a43ffd228fe4aa3 to your computer and use it in GitHub Desktop.
Save gerardjp/644836eece0099ef2a43ffd228fe4aa3 to your computer and use it in GitHub Desktop.
Elastic - Logstash test automapping
{
"template" : "logstash-test-*",
"mappings": {
"_default_": {
"dynamic_templates": [
{
"message_field": {
"path_match": "message",
"match_mapping_type": "string",
"mapping": {
"type": "text",
"norms": false
}
}
},
{
"string_fields": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "text",
"norms": false,
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
],
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "keyword"
},
"bytes_in": {
"type": "integer"
},
"bytes_out": {
"type": "integer"
},
"geoip": {
"dynamic": true,
"properties": {
"ip": {
"type": "ip"
},
"location": {
"type": "geo_point"
},
"latitude": {
"type": "half_float"
},
"longitude": {
"type": "half_float"
}
}
}
}
}
},
"aliases": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment