# Set logstash to only collect data every X seconds

**URL:** <https://discuss.elastic.co/t/set-logstash-to-only-collect-data-every-x-seconds/45368>\
**Category:** Logstash\
**Created:** [March 24, 2016, 4:01pm UTC](https://discuss.elastic.co/t/set-logstash-to-only-collect-data-every-x-seconds/45368 "2016-03-24T16:01:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssi](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@ssi](https://discuss.elastic.co/u/ssi)\
**Post date:** [March 24, 2016, 4:01pm UTC](https://discuss.elastic.co/t/set-logstash-to-only-collect-data-every-x-seconds/45368/1 "2016-03-24T16:01:02Z")

</div>

is there an option for logstash to only collect to elasticsearch every X second

i indexing netflow do display network bandwith usage and getting the data every other second or every 5 seconds is enough for us to see if we are getting close to our bandwith limit.

also i hope it will reduce cpu and memory usage and storage.

currently the netflow data is being send directly from our firewall to the logstash machine.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 25, 2016, 2:41am UTC](https://discuss.elastic.co/t/set-logstash-to-only-collect-data-every-x-seconds/45368/2 "2016-03-25T02:41:36Z")

</div>

Not directly, you'd need to look at the aggregate filter, or something like that.

---

<div class="post-metadata">

**Author:** ![okwap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/okwap/32/572_2.png) [@okwap](https://discuss.elastic.co/u/okwap)\
**Post date:** [March 25, 2016, 5:25am UTC](https://discuss.elastic.co/t/set-logstash-to-only-collect-data-every-x-seconds/45368/3 "2016-03-25T05:25:18Z")

</div>

You can use sleep filter [https://www.elastic.co/guide/en/logstash/current/plugins-filters-sleep.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-sleep.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:** [July 6, 2017, 5:05am UTC](https://discuss.elastic.co/t/set-logstash-to-only-collect-data-every-x-seconds/45368/4 "2017-07-06T05:05:25Z")

</div>


