Hi,
I just want to asking,
I has a json file which contains of several fields likes:
{
"ID": 12345
"title": "Example Post",
"views_count": 881,
"author": "John Doe",
"content": "This is an example post."
}
As you can see, at the views_count will change for every minutes. As you can see the value is 881 and i will changes from time to time. My questions is, how to dynamically update the views_count value in logstash configuration because when i indexing the file into elasticsearch, the views count is still 881 and not change. Currently I need to reload manually my logstash configuration file to able the views_count updated.
I'm attached my logstash configuration file as your references:
input {
file {
path => "/home/user1/data/development/kword_*.json"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => json
tags => ["Twitter", "Keywords"]
stat_interval => 1
}
}
filter {
json {
source => "message"
}
}
output {
elasticsearch {
hosts => ["http://elastic:xxxxxxx@192.168.120.200:9200"]
manage_template => false
document_id => "%{ID}"
index => "testing-kword-development"
}
}
Thanks