Skip to content

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

@chancepants

Description

@chancepants

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions