Last active
November 5, 2018 15:59
-
-
Save acarrill/a114a73f3c09a473cd4f161949d1ac0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"geoip": { | |
"properties": { | |
"city_name": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"continent_code": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"country_code2": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"country_code3": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"country_name": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"dma_code": { | |
"type": "long" | |
}, | |
"ip": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"latitude": { | |
"type": "float" | |
}, | |
"location": { | |
"properties": { | |
"lat": { | |
"type": "float" | |
}, | |
"lon": { | |
"type": "float" | |
} | |
} | |
}, | |
"longitude": { | |
"type": "float" | |
}, | |
"postal_code": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"region_code": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"region_name": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
}, | |
"timezone": { | |
"type": "text", | |
"fields": { | |
"keyword": { | |
"type": "keyword", | |
"ignore_above": 256 | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter { | |
mutate { | |
rename => { | |
"longitude" => "[location][lon]" | |
"latitude" => "[location][lat]" | |
} | |
} | |
if [source] =~ "access" { | |
mutate { replace => { "type" => "apache_access" } } | |
grok { | |
match => { "message" => "%{COMBINEDAPACHELOG}" } | |
} | |
geoip { | |
source => "clientip" | |
} | |
} | |
if [source] =~ "fundacion" { | |
grok{ | |
match => { "message" => "%{IP:client}" } | |
} | |
geoip { | |
source => "client" | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment