influxdata / telegraf

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
https://influxdata.com/telegraf
MIT License
14.87k stars 5.59k forks source link

[inputs.tail] Plugin stop collect data when file is removed during the collect #16193

Open tguenneguez opened 1 week ago

tguenneguez commented 1 week ago

Relevant telegraf.conf

[[inputs.filestat]]
  files = ["/opt/application/44otest/random_file/*.txt"]

Logs from Telegraf

2024-11-14T20:51:07Z E! [inputs.tail] Tailing "/opt/application/44otest/random_file/number_joffmgwfwv.txt": Error watching for changes on /opt/application/44otest/random_file/number_joffmgwfwv.txt: no such file or directory

2024-11-14T20:51:07Z E! [inputs.tail] Tailing "/opt/application/44otest/random_file/number_jynjyxhlyv.txt": Error watching for changes on /opt/application/44otest/random_file/number_jynjyxhlyv.txt: no such file or directory

System info

Telegraf 1.32.1, Redhat 8.4

Docker

N/A

Steps to reproduce

  1. Use tail plugin for pattern file
  2. Execute telegraf
  3. Run script to generate and remove file very often
  4. Wait ;-)

Expected behavior

The plugin should generate an Warning event and continue to collect

Actual behavior

The plugin stop collect data

Additional info

No response