0
votes

I am using Logstash 2.3 and I have the following conf file.

I would expect to see in Kibana in the "Fields" section on the left the options for "JobID" displaying my job codebut I don't.

I see

@timestamp @version _id _index _type host path I do see in the _source section on the right side the following...

This is the message I received when I run the .conf file enter image description here

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

My txt file only contains 4 roles

0001
0002
0003
0004

Thanks

1

1 Answers

0
votes

You should change the path => "C:/Job/Code.txt" to path => "C:\Job\Code.txt"