# Is it possible to control the interval logstash send data to elasticsearch?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-control-the-interval-logstash-send-data-to-elasticsearch/332839>\
**Category:** Logstash\
**Created:** [May 8, 2023, 6:03pm UTC](https://discuss.elastic.co/t/is-it-possible-to-control-the-interval-logstash-send-data-to-elasticsearch/332839 "2023-05-08T18:03:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wang\_Yin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wang_yin/32/106901_2.png) [@Wang\_Yin](https://discuss.elastic.co/u/Wang_Yin)\
**Post date:** [May 8, 2023, 6:03pm UTC](https://discuss.elastic.co/t/is-it-possible-to-control-the-interval-logstash-send-data-to-elasticsearch/332839/1 "2023-05-08T18:03:54Z")

</div>

I'm very new to ELK, I'd like to know is it possible to control the interval logstash send data to elasticsearch?

For example, I have a simple logstash config file running in /etc/logstash/conf.d folder:

```auto
input {
  file {
       path => ["/usr/share/logstash/ncs.log"]
       tags => ["ncs"]
       start_position => "beginning"
  }
}

output {
  if "ncs" in [tags] {
  stdout { codec => rubydebug }
  elasticsearch {
    hosts => ["https://12.34.56.78"]
    index => "ncs-test-%{+YYYY.MM}"
  }
}
}

```

I noticed that logstash keeps sending the content of /usr/share/logstash/ncs.log to elasticsearch every 0.5 second, even when there's no change to that file. Can I change that interval, say from 0.5 second to 300 seconds?

I tried using stat\_interval =\> 300 and discover\_interval =\> 300 in Input plugin, but to no avail (and I'm not sure if it's the correct way to control the interval logstash send data to elasticsearch).

Any help or guidance will be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [May 9, 2023, 8:13am UTC](https://discuss.elastic.co/t/is-it-possible-to-control-the-interval-logstash-send-data-to-elasticsearch/332839/2 "2023-05-09T08:13:13Z")

</div>

Should be on the level LS configuration not a .conf file.  
Check [`pipeline.batch.delay` and `pipeline.batch.size`](https://www.elastic.co/guide/en/logstash/current/tuning-logstash.html) and [this](https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 6, 2023, 8:13am UTC](https://discuss.elastic.co/t/is-it-possible-to-control-the-interval-logstash-send-data-to-elasticsearch/332839/3 "2023-06-06T08:13:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
