fluentd
fluentd copied to clipboard
[in_tail] tail multiple logs file DailyRollingFileAppender Logback
I have read issue #544 and realize my problem is related that.
- LogBack also uses a RollingFileAppender configure to append a new file every day:
- For disaster recovery, i have to configure fluentd tail last 7 days of logfile:
<source>
@type tail
// i want tails current logback file and last 6 days before today
path /var/log/tomcat/Application.log,
// last 6 days before file
/var/log/Application.log.2022-09-*
follow_inodes true
path_timezone "Asia/Tokyo"
time_format "%Y-%m-%d"
pos_file /var/log/tomcat/log.pos
tag tail.multiple
<parse>
@type json
</parse>
</source>
Describe the solution you'd like
Is there any way to solve my problem ?
Describe alternatives you've considered
N/A
Additional context
No response
@repeatedly Can you give me a hand on this?
No this is not possible as of v1.15.1. Fluentd will just send each log twice with your configuration.
To archive your requirement, Fluentd needs to maintain the complete file history, but it just currently has no such ability.