我第一次尝试启动logstash时遇到此错误。
[logstash.agent]无法创建管道{:reason =>"预期的#,\",', - ,[,{第3行,第17列(字节) 34)输入{\ n file {\ n path => "}
我无法在网上找到有关为什么会给我这个错误的任何帮助。
这是我的代码:
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{}
}
答案 0 :(得分:0)
用双引号封装路径,如下所示。
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{}
}