Skip to content

Commit

Permalink
Update logstash template for elastic to match new format (version 8+)
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcook committed Aug 6, 2024
1 parent 194df92 commit d5238ec
Showing 1 changed file with 69 additions and 41 deletions.
110 changes: 69 additions & 41 deletions docker/logstash/templates/wforce_template.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,70 @@
{
"index_patterns" : ["logstash-wforce*"],
"settings" : { "index.refresh_interval" : "5s"},
"mappings" : {
"dynamic_templates" :
[
{
"minor_fields" : {
"match" : "*minor",
"mapping" : { "type" : "integer", "index" : true }
}
},
{
"major_fields" : {
"match" : "*major",
"mapping" : { "type" : "integer", "index" : true }
}
},
{
"string_fields" : {
"match_mapping_type" : "string",
"mapping" : { "type" : "keyword", "index" : true }
}
}
],
"properties" : {
"geoip" : {
"dynamic": true,
"properties" : {
"ip": { "type": "ip" },
"location" : { "type" : "geo_point" },
"latitude" : { "type" : "half_float" },
"longitude" : { "type" : "half_float" }
}
},
"policy_reject": { "type": "boolean" },
"success": { "type": "boolean"},
"tls": { "type": "boolean" },
"t": { "type": "float" }
}
}
{
"index_patterns" : ["logstash-wforce*"],
"template": {
"settings": {
"index.refresh_interval": "5s"
},
"mappings": {
"dynamic_templates": [
{
"minor_fields": {
"match": "*minor",
"mapping": {
"type": "integer",
"index": true
}
}
},
{
"major_fields": {
"match": "*major",
"mapping": {
"type": "integer",
"index": true
}
}
},
{
"string_fields": {
"match_mapping_type": "string",
"mapping": {
"type": "keyword",
"index": true
}
}
}
],
"properties": {
"geoip": {
"dynamic": true,
"properties": {
"ip": {
"type": "ip"
},
"location": {
"type": "geo_point"
},
"latitude": {
"type": "half_float"
},
"longitude": {
"type": "half_float"
}
}
},
"policy_reject": {
"type": "boolean"
},
"success": {
"type": "boolean"
},
"tls": {
"type": "boolean"
},
"t": {
"type": "float"
}
}
}
}
}

0 comments on commit d5238ec

Please sign in to comment.