Hello,
I've read many topics in about this problem but it's still not resolved for me.
I have a fileabeat 6.2.2 installed on Windows, it will send logs logs to a Logstash 6.2.2 installed on Linux.
This my filebeat config:
- type: log
scan_freqency: 10s
paths:
- C:\logs\example.log
encoding: utf-8
Logstash config:
input {
beats {
port => 5044
codec => json { charset => "UTF-8" }
}
}
output {
http {
automatic_retries => 10
content_type => "application/json"
format => "json"
http_method => "post"
ignorable_codes => 409
keepalive => true
url => "http://localhost:9090"
}
file {
path => "D:\\result.txt"
codec => json { charset => "UTF-8" }
}
}
Logs are :
2018-09-26 16:05 - First: é, Second: è
2018-09-26 16:06 - Third: à, Fourth: â
Results in my web application (linked to a database) and in the file D:\result.txt:
2018-09-26 16:05 - First: ├®, Second: ├¿
2018-09-26 16:06 - Third: à, Fourth: â
Results from the Console (Ruby debug output) :
2018-09-26 16:05 - First: é, Second: è
2018-09-26 16:06 - Third: à, Fourth: â
I tried many encoding charsets following theses links :
https://www.elastic.co/guide/en/logstash/current/plugins-codecs-json.html
https://www.elastic.co/guide/en/logstash/current/plugins-codecs-plain.html
But I always get the same issue.
I also changed configuration :
- removed encoding: utf-8 from filebeat configuration
- removed codec => json{ charset => "UTF-8" } from Logstash config
And nothing worked..
Can anyone help on this ? Thanks