cowrie/utils/logstash-kippo.conf

59 lines
1.4 KiB
Plaintext
Raw Normal View History

2014-11-17 19:05:26 +00:00
input {
file {
2014-11-17 20:38:23 +00:00
path => ["/home/michel/src/kippo-git/log/kippo.json", "/home/kippo/kippo-git/log/kippo.json"]
# path => ["/home/michel/src/kippo-git/log/kippo.json"]
2014-11-17 19:05:26 +00:00
codec => json
type => "kippo"
}
}
filter {
if [type] == "kippo" {
date {
match => [ "timestamp", "ISO8601" ]
locale => "en"
}
2014-11-17 20:38:23 +00:00
2014-11-17 19:05:26 +00:00
if [src_ip] {
2014-11-17 20:38:23 +00:00
dns {
reverse => [ "src_host", "src_ip" ]
action => "append"
}
2014-11-17 19:05:26 +00:00
geoip {
source => "src_ip"
target => "geoip"
database => "/opt/logstash/vendor/geoip/GeoLiteCity.dat"
add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ]
}
2014-11-18 10:40:29 +00:00
geoip {
source => "src_ip"
database => "/opt/logstash/vendor/geoip/GeoIPASNum.dat"
}
2014-11-17 19:05:26 +00:00
mutate {
convert => [ "[geoip][coordinates]", "float" ]
}
}
}
}
output {
if [type] == "kippo" {
2014-11-17 20:38:23 +00:00
elasticsearch { host => helium }
2014-11-17 19:05:26 +00:00
file {
path => "/tmp/kippo-logstash.log"
codec => json
}
stdout {
codec => rubydebug
}
}
}