【问题标题】:logstash - agent-Cannot create pipelinelogstash - 代理 - 无法创建管道
【发布时间】:2017-11-06 02:16:02
【问题描述】:

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

[logstash.agent] 无法创建管道 {:reason=>“输入后的第 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{}
}

【问题讨论】:

    标签: elasticsearch logstash kibana elastic-stack


    【解决方案1】:

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

    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{}
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-13
      • 2021-07-03
      • 1970-01-01
      相关资源
      最近更新 更多