【问题标题】:Logstash reports [0] _grokparsefailureLogstash 报告 [0] _grokparsefailure
【发布时间】:2016-05-05 02:18:02
【问题描述】:

我正在使用 Logstash 2.3,并且我有以下 conf 文件。

我希望在 Kibana 的左侧“字段”部分中看到“JobID”选项显示我的工作代码,但我没有。

我明白了

@时间戳 @版本 _ID _指数 _type 主机路径 我确实在右侧的 _source 部分看到了以下内容...

这是我在运行 .conf 文件时收到的消息

input{
    file{
        path => "C:/Job/Code.txt"
        start_position => "beginning"
    }
}
filter{
    json{source => "message"}
    grok{
    match => ["@message","%{WORD:job_id}"]
    add_tag => "grokked"
        }
mutate {
        add_field => [ 'JobID', "%{job_id}" ]
    }
}
output{
    elasticsearch { hosts => ["localhost:9200"] }
    stdout { codec => rubydebug }   
}

我的txt文件只包含4个角色

0001
0002
0003
0004

谢谢

【问题讨论】:

    标签: logstash logstash-grok logstash-configuration


    【解决方案1】:

    您应该将路径 => "C:/Job/Code.txt" 更改为路径 => "C:\Job\Code.txt"

    【讨论】:

      猜你喜欢
      • 2016-07-29
      • 1970-01-01
      • 2023-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-07
      相关资源
      最近更新 更多