Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailing to stdout does not follow rotated/renamed files #626

Open
Chancepants opened this issue Oct 23, 2023 · 0 comments
Open

Tailing to stdout does not follow rotated/renamed files #626

Chancepants opened this issue Oct 23, 2023 · 0 comments

Comments

@Chancepants
Copy link

The tail command used to emit splunkd_stderr.log (or a custom log file) to stdout does not handle the file being rotated/renamed. The current command uses -f https://github.com/splunk/docker-splunk/blob/9.1.1/splunk/common-files/entrypoint.sh#L65 but likely should use -F

     -F      The -F option implies the -f option, but tail will also check to see if the file being
             followed has been renamed or rotated.  The file is closed and reopened when tail
             detects that the filename being read from has a new inode number.

In my current environment I have splunk running container image 9.0.6 and have verified the tail command is running via ps aux | grep tail and logs are actively being written to splunkd_stderr.log. I've also confirmed logs stopped being written to stdout immediately after file rotation splunkd_stderr.log -> splunkd_stderr.log.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant