logstash - 代理 - 无法创建管道

logstash - agent-Cannot create pipeline

第一次尝试启动 logstash 时出现此错误。

[logstash.agent ] 无法创建管道 {:reason=>"Expected one of #, \", ', -, [ { 输入后第 3 行第 17 列(字节 34){\n 文件{ \n 路径 => "}

我在网上找不到任何关于为什么会出现此错误的帮助。

这是我的代码:

input{
    file{
        path => /Users/my-computer/Desktop/data/CIM10FR.csv
        start_position => "beginning"
        sincedb_path => "/dev/null"
    }
}

filter{
    csv{
      separator => ","
      columns => [code, term]
      }
}

output{
    elasticsearch{
        hosts => "localhost"
        index => "CIM10FR"
        document_type => "hospitalcodesCIM10FR"
    }
    stdout{}
}

用双引号封装路径,如下所示。

input{
    file{
        path => "/Users/my-computer/Desktop/data/CIM10FR.csv"
        start_position => "beginning"
        sincedb_path => "/dev/null"
    }
}

filter{
    csv{
      separator => ","
      columns => [code, term]
      }
}

output{
    elasticsearch{
        hosts => "localhost"
        index => "CIM10FR"
        document_type => "hospitalcodesCIM10FR"
    }
    stdout{}
}