# Is possible to read only new CSV files via Telegraf?

**URL:** <https://community.influxdata.com/t/is-possible-to-read-only-new-csv-files-via-telegraf/23858>\
**Category:** Telegraf\
**Tags:** influxdb, telegraf, csv\
**Created:** [February 14, 2022, 3:34pm UTC](https://community.influxdata.com/t/is-possible-to-read-only-new-csv-files-via-telegraf/23858 "2022-02-14T15:34:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JMU](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JMU](https://community.influxdata.com/u/JMU)\
**Post date:** [February 14, 2022, 3:34pm UTC](https://community.influxdata.com/t/is-possible-to-read-only-new-csv-files-via-telegraf/23858/1 "2022-02-14T15:34:40Z")

</div>

If there is a directory where every X time a new .csv file is generated, can Telegraf read only the new files and write on InfluxDB.

I appreciate the answers and links of examples if it is necessary.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [February 14, 2022, 11:24pm UTC](https://community.influxdata.com/t/is-possible-to-read-only-new-csv-files-via-telegraf/23858/2 "2022-02-14T23:24:28Z")

</div>

Hello @JMU,  
You can use the tail plugin to tail an existing CSV.

> <https://github.com/influxdata/telegraf/blob/master/plugins/inputs/tail/README.md>

But for new files I think you’d have to use the execd input plugin and create your own solution

> <https://github.com/influxdata/telegraf/blob/master/plugins/inputs/execd/README.md>

[Plugin Spotlight: Exec & Execd | InfluxData](https://www.influxdata.com/blog/plugin-spotlight-exec-execd/#:~:text=The%20execd%20input%20plugin%20allows,any%20accepted%20Input%20Data%20Formats).
