Hi all.
Can someone help me to findout why I get a "_geoip_lookup_failure".
I have separate elasticsearch and logstash servers.
On elasticsearch I have install the plugin "ingest-geoip"
$ sudo bin/elasticsearch-plugin install ingest-geoip
On logstash I have install the plugin "logstash-filter-geoip"
$ sudo bin/logstash-plugin install logstash-filter-geoip
I have a complex grok filter to parse a proprietary firewall syslog stream.
A part of this filter is "geoip".
I thought I have only to map my index pattern to the geoip configuration option.
Thats my config file
#############################################################
input {
udp {
port => 514
type => syslog
}
}
filter {
if [type] == "syslog" {
grok {
match => { "message" => "<%{WORD}>%{TIMESTAMP_ISO8601:Syslog-Zeit}%{SPACE}%{IPV4:Src-IP}...<removed>...%{IPV4:Dst-IP}...<removed>"}
}
geoip {
source => "Src-IP"
target => "Dst-IP"
}
}
}
output {
elasticsearch {
hosts => ["<removed>"]
user => "<removed>"
password => "<removed>"
index => "syslog-%{+YYYY.MM}"
}
stdout { codec => rubydebug }
}
#############################################################
Logstash is loading the geoip database:
#############################################################
[2018-03-25T18:20:35,265][INFO ][logstash.filters.geoip ] Using geoip database {:path=>"/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-geoip-5.0.3-java/vendor/GeoLite2-City.mmdb"}
#############################################################
Thats my output with the "_geoip_lookup_failure"
#############################################################
{
"host" => "10.16.40.3",
"Dst-IP" => "8.8.8.8",
"Dst-Service" => "domain",
"type" => "syslog",
"Dst-Inf" => "dhcp",
"@timestamp" => 2018-03-25T13:55:59.207Z,
"In-Inf" => "eth0",
"Dst-Port" => "53",
"Action" => "Allow",
"Protocoll" => "UDP",
"Src-IP" => "192.168.1.2",
"message" => "<14>2018-03-25T15:55:58+02:00 Test Test/box_Firewall_Activity: Info Test Allow: FWD|UDP|eth0|192.168.1.2|65463|00:0c:29:ed:4e:20|8.8.8.8|53|domain|dhcp|Inet|Normal Operation|10.15.40.206|8.8.8.8|0|1|0|0|0|0||||||\n",
"@version" => "1",
"Syslog-Zeit" => "2018-03-25T15:55:58+02:00",
"Src-Port" => "65463",
"Rule-Name" => "Inet",
"Src-MAC" => "00:0c:29:ed:4e:20",
"tags" => [
[0] "_geoip_lookup_failure"
],
"FW-Engine" => "FWD",
"Boxname" => "Test"
}
#############################################################
Where is my mistake?
Best regards
Ji Ona