logstash运行后报错Expected one of [ \\t\\r\\n], \"#\", \"{\" at line 10, column 1 (byte

问题遇到的现象和发生背景

在运行logstash的配置文件时的报错,好像是conf文件里语句有问题,但参照了一些配置文件实在没找到原因,刚接触这块内容,希望能给我一些解决方法和学习建议,谢谢。

用代码块功能插入代码,请勿粘贴截图

img

img

运行结果及报错内容

[2022-10-18T17:17:23,379][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [ \t\r\n], "#", "{" at line 10, column 1 (byte 148) after input {\nfile {\npath => ["D:/test2.csv"]\nstart_position => "beginning"\n\ntype => "csv_index"\nignore_older => 87400\ncodec => plain {\ncharset => UTF-8\n", :backtrace=>["D:/ELK/elk7.17.6_win/logstash-7.17.6/logstash-core/lib/logstash/compiler.rb:32:in compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:189:in initialize'", "org/logstash/execution/JavaBasePipelineExt.java:72:in initialize'", "D:/ELK/elk7.17.6_win/logstash-7.17.6/logstash-core/lib/logstash/java_pipeline.rb:48:in initialize'", "D:/ELK/elk7.17.6_win/logstash-7.17.6/logstash-core/lib/logstash/pipeline_action/create.rb:52:in execute'", "D:/ELK/elk7.17.6_win/logstash-7.17.6/logstash-core/lib/logstash/agent.rb:388:in block in converge_state'"]}
[2022-10-18T17:17:23,444][INFO ][logstash.runner ] Logstash shut down.
[2022-10-18T17:17:23,451][FATAL][org.logstash.Logstash ] Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.20.1.jar:?]
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.20.1.jar:?]
at D_3a_.ELK.elk7_dot_17_dot_6_win.logstash_minus_7_dot_17_dot_6.lib.bootstrap.environment.

(D:\ELK\elk7.17.6_win\logstash-7.17.6\lib\bootstrap\environment.rb:94) ~[?:?]

我的解答思路和尝试过的方法

修改了conf的一些内容 注释掉charset => UTF-8可以运行,但是表的内容会变成很奇怪的符号

img


其他格式符号空格什么的也改过一些 但都没能够成功运行

我想要达到的结果

把这个csv文件传到我的es中

你filter那里是不是多了个括号