I am fetching data from a text file and feeding it to kibana , When i remove the old data from txt file and insert new one kibana still showing old data appended with new data. My requirement is to kibana show only latest data whatever present in the txt file right now .... not previous one. Below is the logstash file that i have used.
input {
file {
path => "/Users/apple/Documents/Kibana/ELK/logstash-5.5.1/data/check.txt"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
grok {
match => {"message" => "\A%{WORD:crash_site}%{SPACE}%{NUMBER:crash_count:int}"}
}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "check"
document_type => "check_data"
}
}