# Configure filebeat to control how often logs are read and to ignore old logs

**URL:** https://discuss.elastic.co/t/configure-filebeat-to-control-how-often-logs-are-read-and-to-ignore-old-logs/178332
**Category:** Beats
**Tags:** filebeat
**Created:** [April 24, 2019, 9:22pm UTC](https://discuss.elastic.co/t/configure-filebeat-to-control-how-often-logs-are-read-and-to-ignore-old-logs/178332 "2019-04-24T21:22:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![thadc](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@thadc](https://discuss.elastic.co/u/thadc)
#### Post date: [April 24, 2019, 9:22pm UTC](https://discuss.elastic.co/t/configure-filebeat-to-control-how-often-logs-are-read-and-to-ignore-old-logs/178332/1 "2019-04-24T21:22:05Z")

</div>

Hi,  
I have a setup in my filebeat.yml roughly as follows:

filebeat.propectors:  
- type: log  
paths:  
- /tmp/log/typeA\*.log  
pipeline: "pipelineA"  
fields\_under\_root: true  
fields:  
logtype: TYPEA  
- type: log  
paths:  
- /tmp/log/typeB\*.log  
pipeline: "pipelineB"  
fields\_under\_root: true  
fields:  
logtype: TYPEB  
- type: log  
paths:  
- /tmp/log/typeC\*.log  
pipeline: "pipelineC"  
fields\_under\_root: true  
fields:  
logtype: TYPEC

It works fine but I need control on reading. I would like to be able to control the input so that some logs are read more frequently than (e.g. for pipelineC, read only once a day, but for pipelineA, read every minute). I would also like to be able to ignore logs older than a certain age (e.g. ignore logs older than 3 days).

I would be grateful for any ideas. Thank you

---

<div class="post-metadata">

### Author: ![thadc](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@thadc](https://discuss.elastic.co/u/thadc)
#### Post date: [April 26, 2019, 3:55pm UTC](https://discuss.elastic.co/t/configure-filebeat-to-control-how-often-logs-are-read-and-to-ignore-old-logs/178332/2 "2019-04-26T15:55:58Z")

</div>

I will answer this myself:

filebeat.propectors:

- type: log  
paths:
- /tmp/log/typeA\*.log  
ignore\_older: 72h  
scan\_frequency: 10s  
pipeline: "pipelineA"  
fields\_under\_root: true  
fields:  
logtype: TYPEA
- type: log  
paths:
- /tmp/log/typeB\*.log  
ignore\_older: 72h  
scan\_frequency: 10s  
pipeline: "pipelineB"  
fields\_under\_root: true  
fields:  
logtype: TYPEB
- type: log  
paths:
- /tmp/log/typeC\*.log  
ignore\_older: 72h  
scan\_frequency: 10s  
pipeline: "pipelineC"  
fields\_under\_root: true  
fields:  
logtype: TYPEC

---

<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: [May 24, 2019, 3:55pm UTC](https://discuss.elastic.co/t/configure-filebeat-to-control-how-often-logs-are-read-and-to-ignore-old-logs/178332/3 "2019-05-24T15:55:59Z")

</div>

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