# Update the json input file in Logstash

**URL:** <https://discuss.elastic.co/t/update-the-json-input-file-in-logstash/363331>\
**Category:** Logstash\
**Created:** [July 18, 2024, 8:18am UTC](https://discuss.elastic.co/t/update-the-json-input-file-in-logstash/363331 "2024-07-18T08:18:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mario\_kazela](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_kazela/32/124314_2.png) [@mario\_kazela](https://discuss.elastic.co/u/mario_kazela)\
**Post date:** [July 18, 2024, 8:18am UTC](https://discuss.elastic.co/t/update-the-json-input-file-in-logstash/363331/1 "2024-07-18T08:18:34Z")

</div>

Hi,

I just want to asking,

I has a json file which contains of several fields likes:

```auto
{
  "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:

```auto
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
