Skip to content

Instantly share code, notes, and snippets.

@shaheemirza
Forked from regit/logstash_suricata_eve.conf
Created December 15, 2015 06:50
Show Gist options
  • Save shaheemirza/008fded2b836e79f5a13 to your computer and use it in GitHub Desktop.
Save shaheemirza/008fded2b836e79f5a13 to your computer and use it in GitHub Desktop.
A sample Logstash configuration for Suricata JSON output.
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