2016-05-05 20 views
0

Logstash 2.3を使用していますが、次のconfファイルがあります。Logstash reports [0] _grokparsefailure

左の「フィールド」セクションで、私の仕事コードを表示している「ジョブID」のオプションはわかりませんが、私はそうは思いません。

私が見

@timestamp @version _id _indexこれは私が受信したメッセージがある

ホストパス は、私は以下の右側に_sourceセクションに表示さん _type ...私は

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

enter image description here マイtxtファイルを.confファイルを実行すると含まれている4つの役割

0001 
0002 
0003 
0004 

おかげ

答えて

0
あなたはパス=>変更する必要があり

:パスに "C /Job/Code.txtを" => "C:\仕事\ Code.txt"