Hello all,
i am very new to logstash. I am just testing some filters to extract content from txt files without any structure. Why is this happening?
On Windows enviroment
logstash config file
input {
file {
path => "C:/test/*.txt"
start_position => "beginning"
codec => plain {
charset => "UTF-16"
}
}
}
filter {
}
output {
stdout {}
}
first text line of the file:
echo "first line text file..." >> file.txt
message content in log output is correct:
{
"path" => "C:/test/file.txt",
"message" => "first line text file...\r",
"host" => "DESKTOP",
"tags" => [
[0] "_grokparsefailure"
],
"@timestamp" => 2020-01-07T14:55:37.172Z,
"@version" => "1"
}
a second line added to the file (and next ones):
echo "second line text file..." >> file.txt
why message content in log output shows "?"
{
"path" => "C:/test/file.txt",
"message" => "??????????????????????????",
"host" => "DESKTOP",
"tags" => [
[0] "_grokparsefailure"
],
"@timestamp" => 2020-01-07T15:11:49.747Z,
"@version" => "1"
}
Best regards,
nino