Hi guys!
USE CASE 1 : my log directory containing many log files (hundreds or thousands of files produced daily). Promtail will remain reading all these files until they are rotated.
Is there a chance to let promtail to read only the contents of the last file (in terms of the last write) present in a given directory?
Alternatively, add a date into promtail path configuration, something like:
/usr/local/application/logs/*date +%F
Reason is that in that path I have all the logs with ie: app_xyz_2021-11-16
So I’d like promtail to read just the last file everyday
USE CASE 2 : IIS log directory contain many files like
u_ex211116_x.log
u_ex211115_x.log
u_ex211114_x.log
...
The format is u_exYYMMDD_x.log
How can I explain to promtail that only in the today’s log (in that case u_ex211116_x.log
) will be new log lines?
Many thanks!