Thanks for your answer but I don't really understand it, I'm probably doing something wrong in ELK8 that was easy in ELK7
For this workflow, I want to ingest xferlog from a FTP server that look like this :
2024/02/26 07:50:20 31.218.137.72 user1 STOR 3431594 /testfile
In my worklow, Filebeat does nothing but shipping the log (+ 1 or 2 extra fields) to Logstash that parses is this way :
grok {
patterns_dir => [ "/usr/share/logstash/patterns" ]
match => [
"message", "%{TIMESTAMP_XFERLOG:timestamp} (?::ffff:)?%{IP:ip} %{NOTSPACE:user} %{WORD:cmd} %{NUMBER:size} %{PATH:file}"
]
}
geoip {
source => "ip"
ecs_compatibility => "disabled"
}
Maybe I'm doing something wrong with "ecs_compatibility => "disabled"" but I did not figure it yet...
I've had to add it to make Logstash work with my settings
And logstash gives me this output :
{ "@timestamp" => 2024-02-26T07:50:20.000Z,
"geoip" => {
"country_code3" => "AE",
"city_name" => "Dubai",
"country_code2" => "AE",
"region_code" => "DU",
"continent_code" => "AS",
"timezone" => "Asia/Dubai",
"location" => {
"lon" => 55.298,
"lat" => 25.0731
},
"latitude" => 25.0731,
"country_name" => "United Arab Emirates",
"ip" => "31.218.137.72",
"region_name" => "Dubai",
"longitude" => 55.298
},
"event" => {
"original" => "2024/02/26 07:50:20 31.218.137.72 user1 STOR 3431594 /testfile"
},
"cmd" => "STOR",
"size" => 3431594,
"file" => "/testfile",
"@version" => "1",
"message" => "2024/02/26 07:50:20 31.218.137.72 user1 STOR 3431594 /testfile",
"type" => "xferlog",
"ip" => "31.218.137.72",
"user" => "user1"
}
What mapping and how should I modify it as long as I did not have to modify anything when I was running it in ELK7 version ?
Regards.