Path setting for rolling files

Hi, I'm trying to decide for path setting, whether I should be specifying the exact file using the current file name or should I set it as a glob pattern using wild card. For exmaple: if I know my log file name is mylog.log, when rotated, mylog.log.1, mylog.log.2 etc. are created. for path, should I specify:

/mylog.log

or

/mylog.*

to make sure I don't lose any files. It seems both work for me right now, but in production where more data come in, I want to make sure I have all the log records.

Thanks!

As usual, it depends on your use case. If you choose .* pattern and start filebeat, also the old files are sent the first time. I see this is as kind of expected so in general I recommend the .* option. If you use all the default close_* options you should be save in both cases not the loose any data.

This topic was automatically closed after 21 days. New replies are no longer allowed.