【发布时间】:2020-05-02 03:01:20
【问题描述】:
在使用 logstash 推送到 ELK 时,我的数据出现问题。 这是我的输入文件
input {
file {
path => ["C:/Users/HoangHiep/Desktop/test17.txt"]
type => "_doc"
start_position => beginning
}
}
filter {
dissect {
mapping => {
"message" => "%{word}"
}
}
}
output {
elasticsearch{
hosts => ["localhost:9200"]
index => "test01"
}
stdout { codec => rubydebug}
}
我的数据是
"day la text"
这是输出
{
"host" => "DESKTOP-T41GENH",
"path" => "C:/Users/HoangHiep/Desktop/test17.txt",
"@timestamp" => 2020-01-15T10:04:52.746Z,
"@version" => "1",
"type" => "_doc",
"message" => "\"day la text\"\r",
"word" => "\"day la text\"\r"
}
有没有办法处理字符( " )。 我希望“单词”就像“day la text \r”没有字符\“
谢谢大家。
【问题讨论】:
标签: elasticsearch logstash elk