-
-
Save shaheemirza/008fded2b836e79f5a13 to your computer and use it in GitHub Desktop.
A sample Logstash configuration for Suricata JSON output.
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
input { | |
file { | |
path => [ "/usr/local/var/log/suricata/eve.json" ] | |
codec => json | |
} | |
} | |
filter { | |
if [src_ip] { | |
geoip { | |
source => "src_ip" | |
target => "geoip" | |
# set database variable to full path to geoip database if you've got | |
# the message: "You must specify 'database => ...' in your geoip filter" | |
#database => "/path/to/GeoLiteCity.dat" | |
add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ] | |
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ] | |
} | |
mutate { | |
convert => [ "[geoip][coordinates]", "float" ] | |
} | |
} | |
} | |
output { | |
stdout { codec => rubydebug } | |
elasticsearch { embedded => true } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment