Grok 在调试器中通过 input{stdin.但是无法输出到elasticsearch

Grok succeeds in debugger and through input{stdin. But fails to output to elasticsearch

input {
     file  {
    path => "C:/ELK/LocalLogs/*"
    start_position => beginning
       }
     }
    filter {
      grok{
       match => { "message" => ["%{GREEDYDATA:first}%{DATE_US:date_}-%{TIME:time_}%{GREEDYDATA:last}"]}
       }

      date {
       match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
            }
     }

    output{
      elasticsearch {
        index => "tst-%{+YYYY.MM.dd}"
        hosts => ["localhost:9200"]
      }
      stdout { codec => rubydebug }
    }

这是输入示例:

library!WindowsService_3!2ec0!10/25/2020-00:00:26:: i INFO: Schedule ace8b126-f566-4324-aa48-a6123f81f28f executed at 10/21/2020 00:00:02.

在使用 input{stdin 和任何 grok 调试器时,它无法输出到 elasticsearch。 请帮忙。我做错了什么?

希望这会对某人有所帮助... 所以我用记事本++打开日志文件,在右下角它显示了编码类型(附件)

然后我输入了这个 link : https://www.elastic.co/guide/en/logstash/current/plugins-codecs-plain.html

并在列表中找到了最接近的名称',即 - “UCS-2BE” 然后我将这一行添加到输入{文件{ 编解码器 => 纯 {charset => "UCS-2BE"} 现在可以了。